diff options
| author | Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> | 2023-09-23 12:11:45 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-23 12:11:45 -0400 |
| commit | ab04bd0dd7dd6a818bbac8c5fef9372c4f597352 (patch) | |
| tree | d37f49273bc48c55ea3e16a243817907af0ebcbc /source/slang/slang-emit-torch.cpp | |
| parent | 263f807285c93272abb0c0352be6f8553f01a373 (diff) | |
More `slangpy` features + polishing (#3233)
* Update user-guide with new slangpy features
* More polishing of new slangpy docs
* Update a1-02-slangpy.md
* Only require contiguity for vector element types
* Added `loadOnce/storeOnce` and subscript operations
* Added docs, `DiffTensorView.dims()` & `DiffTensorView.stride(uint)`
* Add constructors, remove storeOnce/loadOnce test
* Adjusted intrinsic definitions
Diffstat (limited to 'source/slang/slang-emit-torch.cpp')
| -rw-r--r-- | source/slang/slang-emit-torch.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-emit-torch.cpp b/source/slang/slang-emit-torch.cpp index 7cd793ec1..54408aa80 100644 --- a/source/slang/slang-emit-torch.cpp +++ b/source/slang/slang-emit-torch.cpp @@ -118,6 +118,13 @@ bool TorchCppSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& emitStringLiteral(getUnmangledName(inst->getOperand(0))); m_writer->emit(", "); emitTorchScalarTypeName(m_writer, inst->getOperand(0)->getDataType()); + m_writer->emit(", "); + + if (as<IRVectorType>(inst->getOperand(0)->getDataType())) + m_writer->emit("true"); + else + m_writer->emit("false"); + m_writer->emit(")"); return true; } |
