summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-pytorch-cpp-binding.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2023-09-21 23:31:03 +0800
committerGitHub <noreply@github.com>2023-09-21 11:31:03 -0400
commit65e1a5be6d2c1a470df93eff5dd8cd04589485da (patch)
treed015c1a7ed84a11df6ec21ed718bf974db4d5f3c /source/slang/slang-ir-pytorch-cpp-binding.cpp
parentc31f456bce65c897e15b1a429e38b34fafff44e6 (diff)
fix warnings (#3224)
* Remove unused variable * Remove unused variable * Remove unused if bindings
Diffstat (limited to 'source/slang/slang-ir-pytorch-cpp-binding.cpp')
-rw-r--r--source/slang/slang-ir-pytorch-cpp-binding.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/slang/slang-ir-pytorch-cpp-binding.cpp b/source/slang/slang-ir-pytorch-cpp-binding.cpp
index c0adef436..c723902de 100644
--- a/source/slang/slang-ir-pytorch-cpp-binding.cpp
+++ b/source/slang/slang-ir-pytorch-cpp-binding.cpp
@@ -522,11 +522,6 @@ void generateReflectionFunc(IRBuilder* builder, IRFunc* kernelFunc, IRFunc* host
IRInst* generateHostParamForCUDAParam(IRBuilder* builder, IRParam* param, DiagnosticSink* sink, IRType** outType = nullptr)
{
- auto typeMap = [&](IRType* t) -> IRType* {
- if (auto tensorViewType = as<IRTensorViewType>(t))
- return builder->getTorchTensorType(tensorViewType->getElementType());
- };
-
auto type = translateToHostType(builder, param->getDataType(), sink);
if (outType)
*outType = type;
@@ -749,7 +744,7 @@ IRFunc* generateCUDAWrapperForFunc(IRFunc* func, DiagnosticSink* sink)
builder.addExternCppDecoration(hostFunc, externCppHint->getName());
}
- if (auto exportInfoHint = func->findDecoration<IRAutoPyBindExportInfoDecoration>())
+ if (func->findDecoration<IRAutoPyBindExportInfoDecoration>())
generateReflectionFunc(&builder, func, hostFunc);
return hostFunc;
@@ -919,7 +914,7 @@ void generateDerivativeWrappers(IRModule* module, DiagnosticSink* sink)
builder.emitReturn(fwdDiffCall);
// If the original func is a CUDA kernel, mark the wrapper as a CUDA kernel as well.
- if (auto kernelHint = func->findDecoration<IRCudaKernelDecoration>())
+ if (func->findDecoration<IRCudaKernelDecoration>())
builder.addCudaKernelDecoration(wrapperFunc);
// Add an auto-pybind-cuda decoration to the wrapper function to further generate the
@@ -975,7 +970,7 @@ void generateDerivativeWrappers(IRModule* module, DiagnosticSink* sink)
builder.emitReturn(fwdDiffCall);
// If the original func is a CUDA kernel, mark the wrapper as a CUDA kernel as well.
- if (auto kernelHint = func->findDecoration<IRCudaKernelDecoration>())
+ if (func->findDecoration<IRCudaKernelDecoration>())
builder.addCudaKernelDecoration(wrapperFunc);
// Add an auto-pybind-cuda decoration to the wrapper function to further generate the