From 739c3a7b53dc6489065fcd5e9f0a04370c5f9c8f Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Tue, 19 Sep 2023 18:51:24 -0400 Subject: Added `[AutoPyBindCUDA]` for automatic kernel binding + `[PyExport]` for exporting type information (#3209) * Initial: add a DiffTensor impl * Auto-binding and diff tensor implementations now work * Refactored diff-tensor implementation + added py-export for struct types * Cleanup * Update slang-ir-pytorch-cpp-binding.cpp * Updated test names * Update autodiff-data-flow.slang.expected * Add more versions of load/store & default generic args for DiffTensorView. * Add diagnostic for default generic arg and more tests * Add more `[AutoPyBind]` tests --- source/slang/slang-check-modifier.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source/slang/slang-check-modifier.cpp') diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index 53283fbe1..e8ae28c04 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -757,6 +757,19 @@ namespace Slang knownBuiltinAttr->name = name; } + else if (auto pyExportAttr = as(attr)) + { + // Check name string. + SLANG_ASSERT(attr->args.getCount() == 1); + + String name; + if(!checkLiteralStringVal(attr->args[0], &name)) + { + return false; + } + + pyExportAttr->name = name; + } else { if(attr->args.getCount() == 0) -- cgit v1.2.3