From 6c991942ac4ec2e2abf6abe73a2429183172af84 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Mon, 25 Sep 2023 18:30:34 -0400 Subject: Add test for vector-element contiguity error (#3235) --- source/slang/slang-emit-torch.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source') 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(inst->getOperand(0)->getDataType())) + auto tensorViewType = as(inst->getDataType()); + if (as(tensorViewType->getElementType())) m_writer->emit("true"); else m_writer->emit("false"); -- cgit v1.2.3