-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate functions for reading and translating SPIR-V
The OpenCL runtime API requires that IL be loaded and compiled with separate function calls: 1. clCreateProgramWithIL(), which must check that the IL is well-formed and return CL_INVALID_VALUE if it is not. 2. clBuildProgram() or clCompileProgram(), which allow build options to be specified. To facilitate the above, this change adds two new API functions: 1. readSpirvModule(), which reads an istream to produce a SPIRVModule. 2. convertSpirvToLLVM(), which converts a SPIRVModule to LLVM IR. The existing readSpirv() function is refactored in terms of these calls, but is kept in the API for the convenience of tools such as llvm-spirv.
- Loading branch information
1 parent
35666af
commit 62fe6db
Showing
2 changed files
with
42 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters