-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SPIRV-LLVM-Translator and translation pass
- Loading branch information
1 parent
b090636
commit a1db193
Showing
7 changed files
with
178 additions
and
1 deletion.
There are no files selected for viewing
Empty file.
34 changes: 34 additions & 0 deletions
34
third_party/tsl/third_party/spirv_llvm_translator/spirv_llvm_translator.BUILD
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
cc_library( | ||
name = "spirv_llvm_translator", | ||
srcs = glob([ | ||
"lib/SPIRV/libSPIRV/*.cpp", | ||
"lib/SPIRV/libSPIRV/*.hpp", | ||
"lib/SPIRV/libSPIRV/*.h", | ||
"lib/SPIRV/Mangler/*.cpp", | ||
"lib/SPIRV/Mangler/*.h", | ||
"lib/SPIRV/*.cpp", | ||
"lib/SPIRV/*.hpp", | ||
"lib/SPIRV/*.h", | ||
]), | ||
hdrs = glob(["include/*"]), | ||
includes = [ | ||
"include/", | ||
"lib/SPIRV/", | ||
"lib/SPIRV/Mangler/", | ||
"lib/SPIRV/libSPIRV/", | ||
], | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@llvm-project//llvm:Analysis", | ||
"@llvm-project//llvm:BitWriter", | ||
"@llvm-project//llvm:CodeGen", | ||
"@llvm-project//llvm:Core", | ||
"@llvm-project//llvm:Demangle", | ||
"@llvm-project//llvm:IRReader", | ||
"@llvm-project//llvm:Linker", | ||
"@llvm-project//llvm:Passes", | ||
"@llvm-project//llvm:Support", | ||
"@llvm-project//llvm:TransformUtils", | ||
"@spirv_headers//:spirv_cpp_headers", | ||
], | ||
) |
20 changes: 20 additions & 0 deletions
20
third_party/tsl/third_party/spirv_llvm_translator/spirv_llvm_translator.patch
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/lib/SPIRV/SPIRVInternal.h b/lib/SPIRV/SPIRVInternal.h | ||
index a828add8..924e13b4 100644 | ||
--- a/lib/SPIRV/SPIRVInternal.h | ||
+++ b/lib/SPIRV/SPIRVInternal.h | ||
@@ -179,11 +179,12 @@ typedef SPIRVMap<Op, Op, IntBoolOpMapId> IntBoolOpMap; | ||
"-v512:512:512-v1024:1024:1024" | ||
|
||
enum SPIRAddressSpace { | ||
- SPIRAS_Private, | ||
+ SPIRAS_Generic, | ||
SPIRAS_Global, | ||
- SPIRAS_Constant, | ||
+ SPIRAS_Internal, | ||
SPIRAS_Local, | ||
- SPIRAS_Generic, | ||
+ SPIRAS_Constant, | ||
+ SPIRAS_Private, | ||
SPIRAS_GlobalDevice, | ||
SPIRAS_GlobalHost, | ||
SPIRAS_Input, |
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
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