From ab04bd0dd7dd6a818bbac8c5fef9372c4f597352 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Sat, 23 Sep 2023 12:11:45 -0400 Subject: 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 --- tests/autodiff/autopybind-differentiable.slang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/autodiff/autopybind-differentiable.slang b/tests/autodiff/autopybind-differentiable.slang index 9595a09d2..27df19b8a 100644 --- a/tests/autodiff/autopybind-differentiable.slang +++ b/tests/autodiff/autopybind-differentiable.slang @@ -12,7 +12,7 @@ void myKernel(DiffTensorView inValues, DiffTensorView outValues) { if (cudaThreadIdx().x > 0) return; - outValues.store(cudaThreadIdx().x, sin(inValues.load(cudaThreadIdx().x))); + outValues[cudaThreadIdx().x] = sin(inValues[cudaThreadIdx().x]); } // TORCH: {{^SLANG_PRELUDE_EXPORT$}} -- cgit v1.2.3