diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-09-25 18:30:34 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-25 15:30:34 -0700 |
| commit | 6c991942ac4ec2e2abf6abe73a2429183172af84 (patch) | |
| tree | 1179e99a3b583b233bb1acbca21e0744454b790b /source | |
| parent | 56c4a8cba30b463fdcab21d33680f8ba70b452e0 (diff) | |
Add test for vector-element contiguity error (#3235)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-torch.cpp | 3 |
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"); |
