summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-emit-torch.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-emit-torch.cpp b/source/slang/slang-emit-torch.cpp
index 54408aa80..bacc9d030 100644
--- a/source/slang/slang-emit-torch.cpp
+++ b/source/slang/slang-emit-torch.cpp
@@ -120,7 +120,8 @@ bool TorchCppSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo&
emitTorchScalarTypeName(m_writer, inst->getOperand(0)->getDataType());
m_writer->emit(", ");
- if (as<IRVectorType>(inst->getOperand(0)->getDataType()))
+ auto tensorViewType = as<IRTensorViewType>(inst->getDataType());
+ if (as<IRVectorType>(tensorViewType->getElementType()))
m_writer->emit("true");
else
m_writer->emit("false");