2
编译器
新人贴
如何能将GCN ASM生成Hsaco?
2025-11-07 12:13:29
137
使用dccobjdump --source --inputs=matrixMul对matrixMul测试用例进行反汇编,生成了matrixMul-gfx906-0.ISA.s、matrixMul-gfx926-0.ISA.s等GCN ASM文件。我们想将这些文件编译成Hsaco。 我们参考https://gpuopen.com/learn/amdgcn-assembly/,尝试了如下命令: /opt/dtk-24.04.3/llvm/bin/clang /home/lab6033/workspace/matrixMul-gfx906-0.ISA.s /opt/dtk-24.04.3/llvm/bin/clang -triple amdgcn-amd-amdhsa -x assembler -target amdgcn--amdhsa -mcpu=fiji -c -o test.o /home/lab6033/workspace/matrixMul-gfx906-0.ISA.s /opt/dtk-24.04.3/llvm/bin/clang -cc1as -mllvm --amdhsa-code-object-version=4 -triple amdgcn-amd-amdhsa -filetype obj -target-cpu gfx906 -dwarf-version=4 -mrelocation-model pic --mrelax-relocations -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false -o /home/lab6033/workspace/matrixMul-gfx906-0.ISA.s /opt/dtk-24.04.3/llvm/bin/clang -cc1as -mllvm --amdhsa-code-object-version=4 -triple amdgcn-amd-amdhsa -filetype obj -main-file-name matrixMul-gfx906-0.ISA.s -target-cpu gfx906 -dwarf-version=4 -mrelocation-model pic --mrelax-relocations -mllvm -amdgpu-early-inline-all=true -mllvm -amdgpu-function-calls=false -o test.o matrixMul-gfx906-0.ISA.s 然而,它们都报了类似的错误: ![attachmentId-图片.png](/api-forum/file/Redirect?path=forum/mhoc3zwr20eg/1762488663140/图片.png) 请问如何能将GCN ASM生成Hsaco?或者,如果没有办法使用clang命令生成Hsaco,有没有办法使用hsa runtime API在运行时加载GCN ASM运行?
全部评论(2)
只看楼主
陆
陆梦姣
2楼
请问问题解决了吗?
2025/11/18
王
王琼
1楼
借楼问问题解决了吗?
2025/11/18
没有更多内容了
--
楼主
Level.2
0 帖子
楼主热帖
暂无数据