KhronosGroup / KhronosGroup/OpenCL-Docs
Linking Programs Compiled from Source with Programs Compiled from IL
- Dominant language
- Python
- Stars
- 420
- Forks
- 131
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 11
Description
Creating this issue from a discussion in a SPIRV-LLVM-Translator PR review:
https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1149#discussion_r707579538
Is it possible to link one program object created from source with another program object created from IL?
Discussion "for":
> The program object created from source or IL must be compiled (via clCompileProgram) before it can be linked, which transitions the state of the program object from BINARY_TYPE_NONE to BINARY_TYPE_COMPILED_OBJECT. After the program object has been compiled I can't think of any reason to differentiate between program objects that originated from source and program objects that originate from IL, so the linking should "just work". Is there a detail I'm missing here?
Discussion "against":
> C++ compilers have similar problems here, where a "compiled object" from one version of a compiler doesn't necessarily have the same ABI as a "compiled object" from another version of a compiler, and therefore the two objects can't necessarily be linked. This is similar, if we treat an IL program as an object from one version of a compiler, which might not be the same as the platform's source compiler.
Contributor guide
Research direction
Start with the linked SPIRV-LLVM-Translator PR #1149 discussion and the OpenCL program-object rules around clCompileProgram and linking. Determine whether compiled program objects originating from source and IL may be linked, including any compatibility or ABI constraint; done means the specification gives an unambiguous answer.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100