This simulator executes the HSA code object for AMD GPU on CPU.
- Radeon RX 9060 XT (gfx1200)
- Radeon R9 Nano (gfx803)
| Architecture | Interpreter | LLVM JIT | SPMD JIT |
|---|---|---|---|
| gfx1200 | Supported | Supported | Supported |
| gfx803 | Supported | Not supported | Not supported |
The gfx1200 SPMD backend converts wavefront execution into independent CPU work-items. The examples use cooperative or segmented dispatch when barriers or cross-lane operations require synchronization.
Available examples are bitonic_sort_spmd, histogram_spmd,
raytracing_spmd, simple_hgemm_spmd, smallpt_spmd, texture_spmd, and
warp_shuffle_spmd.
cargo run --release --example smallpt_spmd -- --arch gfx1200Use --num_threads N to select the CPU thread count. Examples that support
packed work-item execution also accept --vec_width W; 0 selects the
single-work-item path.
Please execute the following command.
cargo run --release --example smallptThe kernel program is based on the following CUDA code.
https://github.com/matt77hias/cu-smallpt
Please execute the following command.
cargo run --release --example bitonic_sortThe kernel program is based on the following code.
https://github.com/ROCm/rocm-examples
Please execute the following command.
cargo run --release --example histogramThe kernel program is based on the following code.
https://github.com/ROCm/rocm-examples
Please execute the following command.
cargo run --release --example simple_hgemm -- --arch gfx1200The kernel program is based on the following code.
https://github.com/ROCm/rocWMMA
Please execute the following command.
cargo run --release --example raytracing -- --arch gfx1200The kernel program is based on the following code.
https://github.com/GPUOpen-LibrariesAndSDKs/HIPRTSDK
- The kernel code is translated to an intermediate representation based on LLVM IR.
- The intermediate representation is highly optimized with LLVM optimization passes.
- The optimized intermediate representation is compiled to machine code of the host CPU with LLVM JIT.
- Vector operations are translated to SIMD instructions of the host CPU with LLVM.
- Convert CUDA to HIP with hipify.
See the following official sample: https://github.com/amd/rocm-examples/tree/develop/HIP-Basic/hipify
- Compile the HIP code.
Kernel objects are generated in the intermediate stage before being embedded in the executable binary.
See the following official sample: https://github.com/amd/rocm-examples/tree/develop/HIP-Basic/llvm_ir_to_executable