summaryrefslogtreecommitdiffstats
path: root/prelude/slang-torch-prelude.h
Commit message (Collapse)AuthorAge
* Fix issue with slang-embed & include ordering (#5680)Sai Praveen Bangaru2024-11-25
| | | | | * Fix issue with slang-embed & include ordering * Update CMakeLists.txt
* formatEllie Hermaszewska2024-10-29
| | | | | | | * format * Minor test fixes * enable checking cpp format in ci
* Add `float16` support to slang-torch (#4584)Sai Praveen Bangaru2024-07-10
|
* Error out when constructing tensor views from tensors with 0 stride. (#4516)Sai Praveen Bangaru2024-07-01
| | | | | | | | | This avoids a problem with broadcasted tensors. Our tensor-view platform is designed to allow unrestricted access to tensor memory, while broadcasted tensors were designed for 'read-only' use-cases. Trying to write into a broadcasted tensor needs re-allocation, which Slang is not designed to do. For now, we enforce contiguity on tensors with any 0 strides. In the future, we will introduce a ConstTensorView object to allow such tensors to be used as an input. This patch also propagates name-hint information through structs & arrays of tensors, to allow sensible names for the error messages (before this the error messages were temporary inst numbers, which is nearly impossible to debug)
* Prevent pointer validation for zero-size arrays (#4021)Sai Praveen Bangaru2024-04-24
|
* More `slangpy` features + polishing (#3233)Sai Praveen Bangaru2023-09-23
| | | | | | | | | | | | | | | | | * 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
* Add check for contiguous tensors (#3199)Sai Praveen Bangaru2023-09-08
| | | | | Otherwise, this can lead to undetected scenario where the strides are incorrect for non-scalar types (`float2`, `float3`, etc..) Users must call `tensor = tensor.contiguous()` on the inputs to avoid this error.
* Remove unsupported torch types + add bool type. (#3197)Sai Praveen Bangaru2023-09-08
| | | Co-authored-by: Yong He <yonghe@outlook.com>
* Avoid implicit casts or device transfers. (#2992)Sai Praveen Bangaru2023-07-14
|
* Fix native string emit for CUDA/Cpp backend. (#2980)Yong He2023-07-12
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Various fixes for autodiff and slangpy. (#2876)Yong He2023-05-09
| | | | | | | | | | | | | * Various fixes for autodiff and slangpy. * Fix cuda code gen for `select`. * Fix getBuildTagString(). * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Set sharedMem argument to 0 when launching cuda kernel. (#2799)Yong He2023-04-13
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Fix linking issue in slangpy + no mask param for kernels. (#2778)Yong He2023-04-05
| | | | | | | | | | | | | * Fix linking issue in slangpy + no mask param for kernels. * add cuda header changes * fix * More correct change of active mask insertion. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* More builtin library support in torch backend. (#2760)Yong He2023-03-30
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Convert tensor types in `make_tensor_view`. (#2755)Yong He2023-03-29
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Add slangpy doc, fix cuda prelude. (#2748)Yong He2023-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add slangpy doc, fix cuda prelude. * more bug fix. * fix. * fix. * More fix. * fix. * f * fix prelude. * update prelude. * update doc * Update prelude. * add zeros_like * update doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Add PyTorch C++ binding generation. (#2734)Yong He2023-03-26
* Add PyTorch C++ binding generation. * fix --------- Co-authored-by: Yong He <yhe@nvidia.com>