sarchlab / mgpusim

A highly-flexible GPU simulator for AMD GPUs.
MIT License
93 stars 21 forks source link

Support HIP, as well as OpenCL kernels compiled by new ROCm versions #34

Open syifan opened 10 months ago

syifan commented 10 months ago

Is your feature request related to a problem? Please describe. Currently, we can only support OpenCL kernel compiled with ROCm 3.8, which is very old.

Describe the solution you'd like We need to support the new ABI of the code object v3, which is described here https://llvm.org/docs/AMDGPUUsage.html#kernel-descriptor

Yzgll commented 6 months ago

Hello author, I modified the kernel. cl file of AES a few days ago, but it cannot run after recompiling. I have been testing these days and have downloaded mgpusim again. I used interCPU and also installed ROCm-dev. Afterwards, I only deleted the original kernels.hsaco and kernels.disasm in AES. After recompiling with the clang-ocl command, it did not run correctly. What tools should I use to correctly compile kernel functions to generate HSACO files. Looking forward to your reply! QQ20240419-170247

syifan commented 6 months ago

Hello author, I modified the kernel. cl file of AES a few days ago, but it cannot run after recompiling. I have been testing these days and have downloaded mgpusim again. I used interCPU and also installed ROCm-dev. Afterwards, I only deleted the original kernels.hsaco and kernels.disasm in AES. After recompiling with the clang-ocl command, it did not run correctly. What tools should I use to correctly compile kernel functions to generate HSACO files. Looking forward to your reply! QQ20240419-170247

It looks like that an instruction is not implemented. This is not because you used the wrong compilder, but because our simulator does not support the instruction. Can you add the instruction implementation?

Yzgll commented 6 months ago

Hello author, I modified the kernel. cl file of AES a few days ago, but it cannot run after recompiling. I have been testing these days and have downloaded mgpusim again. I used interCPU and also installed ROCm-dev. Afterwards, I only deleted the original kernels.hsaco and kernels.disasm in AES. After recompiling with the clang-ocl command, it did not run correctly. What tools should I use to correctly compile kernel functions to generate HSACO files. Looking forward to your reply! QQ20240419-170247

It looks like that an instruction is not implemented. This is not because you used the wrong compilder, but because our simulator does not support the instruction. Can you add the instruction implementation?

Thank you for your reply. I will try my best