How can I understand IR?

Or where can I learn the IR? I have read this tutorial:How to optimize GEMM on CPU. https://docs.tvm.ai/tutorials/optimize/opt_gemm.html#sphx-glr-tutorials-optimize-opt-gemm-py It shows me the generated IR. I can not understand them well. How can I understand them or where can I learn them?

you can see Halide/src/ir/IR.h to learn what is IR

I understood IR by writing it in more “manageable” form in the language I am familiar with. The code that has been generated looks more or less following in C++:

for (int x = 0; x < 1024; x++)
{
	for (int y = 0; y < 1024; y++)
	{
		C[(x*1024) + y] = 0.0f;
		for (int k = 0; k < 1024; k++)
		{
			C[(x*1024) + y] += A[(x*1024) + k] * B[(k*1024) + y]
		}
	}
}

When you get those basic patterns you should be able to understand more complex (threads are quite tricky for me especially).

Hope this helps.