diff options
| author | Yong He <yonghe@outlook.com> | 2023-03-30 12:50:02 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-30 12:50:02 -0700 |
| commit | 917416f6db7056cddff9d2a0e4e9b4117359157d (patch) | |
| tree | 9bd6aa89f235e4692cff83cdbe1ce4aae7ea861f /source/slang/slang-ir-pytorch-cpp-binding.cpp | |
| parent | e3b701c9f56f4a2fb8c56a65b5c75b49ee72ca73 (diff) | |
More builtin library support in torch backend. (#2760)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-pytorch-cpp-binding.cpp')
| -rw-r--r-- | source/slang/slang-ir-pytorch-cpp-binding.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/slang/slang-ir-pytorch-cpp-binding.cpp b/source/slang/slang-ir-pytorch-cpp-binding.cpp index 971e87a6f..d59d57474 100644 --- a/source/slang/slang-ir-pytorch-cpp-binding.cpp +++ b/source/slang/slang-ir-pytorch-cpp-binding.cpp @@ -263,8 +263,6 @@ static void generateCppBindingForFunc(IRFunc* func, DiagnosticSink* sink) oldParam->removeAndDeallocate(); } - auto allocator = builder.emitVar(builder.getType(kIROp_TorchKernelMemoryAllocatorType)); - for (auto block : func->getBlocks()) { for (auto inst : block->getChildren()) @@ -297,7 +295,7 @@ static void generateCppBindingForFunc(IRFunc* func, DiagnosticSink* sink) else if (auto getView = as<IRTorchTensorGetView>(inst)) { builder.setInsertBefore(getView); - auto makeView = builder.emitMakeTensorView(getView->getFullType(), allocator, inst->getOperand(0)); + auto makeView = builder.emitMakeTensorView(getView->getFullType(), inst->getOperand(0)); getView->replaceUsesWith(makeView); instsToRemove.add(getView); } |
