KhronosGroup / KhronosGroup/SPIRV-LLVM-Translator

translation from cuda file to spv file

Open
#2,291 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
625
Forks
279
Avg merge
3d 5h
Merged PRs (30d)
34

Description

I realize the conversion from cuda file to spv file.
I first use LLVM to generate the .bc file corresponding to cuda file, and then use llvm-spirv to convert the .bc file into the .spv file.
get an error:

InvalidTargetTriple: Expects spir-unknown-unknown or spir64-unknown-unknown. Actual target triple is x86_64-pc-linux-gnu

how to solve it?

Contributor guide

Open the contributing guide

Research direction

Start by checking how LLVM generates the .bc file and which target triple it uses before passing it to llvm-spirv. Compare that triple with the accepted spir-unknown-unknown or spir64-unknown-unknown targets; done means the CUDA-derived bitcode can be converted to .spv without the InvalidTargetTriple error.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.