diff options
| author | Yong He <yonghe@outlook.com> | 2023-03-26 13:59:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-26 13:59:11 -0700 |
| commit | d64ee86a3130f8eeb75d09193c38c621d7565eba (patch) | |
| tree | fed25a0cc2a7372d26175774f5983bed693e6b64 /source/core | |
| parent | 666af0962b6ab41489a3a3287db83f77c2f6461a (diff) | |
Add PyTorch C++ binding generation. (#2734)
* Add PyTorch C++ binding generation.
* fix
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/core')
| -rw-r--r-- | source/core/slang-type-convert-util.cpp | 1 | ||||
| -rw-r--r-- | source/core/slang-type-text-util.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/source/core/slang-type-convert-util.cpp b/source/core/slang-type-convert-util.cpp index 6e6598357..c763b2835 100644 --- a/source/core/slang-type-convert-util.cpp +++ b/source/core/slang-type-convert-util.cpp @@ -17,6 +17,7 @@ namespace Slang case SLANG_HLSL: return SLANG_SOURCE_LANGUAGE_HLSL; case SLANG_C_SOURCE: return SLANG_SOURCE_LANGUAGE_C; case SLANG_CPP_SOURCE: return SLANG_SOURCE_LANGUAGE_CPP; + case SLANG_CPP_PYTORCH_BINDING:return SLANG_SOURCE_LANGUAGE_CPP; case SLANG_HOST_CPP_SOURCE: return SLANG_SOURCE_LANGUAGE_CPP; case SLANG_CUDA_SOURCE: return SLANG_SOURCE_LANGUAGE_CUDA; default: break; diff --git a/source/core/slang-type-text-util.cpp b/source/core/slang-type-text-util.cpp index d37051e47..9d2f93ba3 100644 --- a/source/core/slang-type-text-util.cpp +++ b/source/core/slang-type-text-util.cpp @@ -78,6 +78,7 @@ static const CompileTargetInfo s_compileTargetInfos[] = { SLANG_SPIRV_ASM, "spv-asm", "spirv-asm,spirv-assembly" }, { SLANG_C_SOURCE, "c", "c" }, { SLANG_CPP_SOURCE, "cpp,c++,cxx", "cpp,c++,cxx" }, + { SLANG_CPP_PYTORCH_BINDING, "cpp,c++,cxx", "torch,torch-binding,torch-cpp,torch-cpp-binding" }, { SLANG_HOST_CPP_SOURCE, "cpp,c++,cxx", "host-cpp,host-c++,host-cxx"}, { SLANG_HOST_EXECUTABLE,"exe", "exe,executable" }, { SLANG_SHADER_SHARED_LIBRARY, "dll,so", "sharedlib,sharedlibrary,dll" }, |
