https://github.com/shader-slang/slang

sort by:
Revision Author Date Message Commit Date
efeda20 Fix stdlib definitions for tensor interlocked methods. (#2761) Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 21:34:54 UTC
917416f More builtin library support in torch backend. (#2760) Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 19:50:02 UTC
e3b701c Enable CUDA render api on unix (#2757) * Remove extra qualification in cuda device impl Only MSVC accepts this illegal code * Enable CUDA render api on unix --------- Co-authored-by: Yong He <yonghe@outlook.com> 30 March 2023, 19:48:02 UTC
72f7928 Fix mismatched malloc/delete[] in toWString (#2758) Co-authored-by: Yong He <yonghe@outlook.com> 30 March 2023, 19:46:27 UTC
d01e28a Fix autodiff pass duplicates exported functions. (#2759) Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 18:41:54 UTC
37594df Update TOC (#2756) Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 04:06:23 UTC
6fa4edb Convert tensor types in `make_tensor_view`. (#2755) Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 01:23:21 UTC
af062bf Fix IRArrayType emit logic. (#2754) * Fix IRArrayType emit logic. * Fix test. * Fix ast constant folding. --------- Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 01:00:34 UTC
082c48d Update checkpoint policy to make obvious recompute decisions. (#2753) * Update checkpoint policy to make obvious recompute decisions. Also adds an optimization to fold updateElement chains on the same array or struct into a single makeArray or makeStruct. * Bug fixes around array types with different int typed count. * change test. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 30 March 2023, 00:05:07 UTC
a862f5b Update a1-02-slangpy.md 29 March 2023, 17:00:48 UTC
bbf12c2 Add missing initializer in json source map decoding (#2752) 29 March 2023, 16:25:15 UTC
64fe75c Update a1-02-slangpy.md 29 March 2023, 01:01:42 UTC
87d331c Update a1-02-slangpy.md 29 March 2023, 00:28:38 UTC
102702c Update a1-02-slangpy.md 29 March 2023, 00:20:54 UTC
cce9094 Update a1-02-slangpy.md 29 March 2023, 00:20:36 UTC
3ca504f Update a1-02-slangpy.md 29 March 2023, 00:16:07 UTC
0ea68f2 Update a1-02-slangpy.md 28 March 2023, 23:55:34 UTC
1f9f604 Update a1-02-slangpy.md 28 March 2023, 23:51:56 UTC
240a29b Update a1-02-slangpy.md 28 March 2023, 23:33:50 UTC
dba963d Update toc (#2749) Co-authored-by: Yong He <yhe@nvidia.com> 28 March 2023, 23:27:45 UTC
92ba905 Update a1-02-slangpy.md 28 March 2023, 23:26:42 UTC
a61f089 Add slangpy doc, fix cuda prelude. (#2748) * 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> 28 March 2023, 22:19:03 UTC
8f03af5 AD: Warped-Area-Sampling test works now. (#2742) * Create render.slang * Added higher-order differentiability decorators for built-ins + preliminary tests * Update diff.meta.slang * Copy over conformance synthesis code to `DifferentiableTypeConformanceContext` * Update render.slang * Fixed 1D warped-area sampling test * Update warped-sampling-1d.slang * Remove commented line. * Change WAS test to use fixed point * Replaced InterlockedCmpExchange with InterlockedAdd * Increase fixed point precision * Reduce floating-point precision by 2 digits to avoid platform-specific problems * Dropped another digit (just to be safe) --------- Co-authored-by: Yong He <yonghe@outlook.com> 28 March 2023, 19:39:52 UTC
e22b4db Small fixes and cleanups on CUDA/CPP codegen. (#2746) * Small fixes and cleanups on CUDA/CPP codegen. * Disable `legalizeEmptyTypes` for now. --------- Co-authored-by: Yong He <yhe@nvidia.com> 28 March 2023, 18:12:40 UTC
0a69260 Translate all composed types into tuple types in pyBind. (#2744) * Translate all composed types into tuple types in pyBind. * Delete temp file. * Fix get tuple element code emit logic. --------- Co-authored-by: Yong He <yhe@nvidia.com> 28 March 2023, 06:00:42 UTC
d120fec Upgrade `slang-llvm` (#2741) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix SlangCompileTarget to keep ordering. * Add test. Remove V2 version of interface to access IDownstreamCompiler Update to slang-llvm which has _chkstk support. * Update slang.h Co-authored-by: Ellie Hermaszewska <github@sub.monoid.al> --------- Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: Ellie Hermaszewska <github@sub.monoid.al> 28 March 2023, 02:52:48 UTC
579870b Apply IR simplifcation immediately after specialization to avoid duplicates. (#2739) * Apply IR simplifcation immediately after specialization to avoid duplicates. * Update source/slang/slang-ir-specialize.cpp Co-authored-by: Ellie Hermaszewska <github@sub.monoid.al> --------- Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Ellie Hermaszewska <github@sub.monoid.al> 28 March 2023, 02:51:21 UTC
84dc318 Don't touch output file if content did not change. (#2738) Co-authored-by: Yong He <yhe@nvidia.com> 28 March 2023, 01:39:44 UTC
ca1f93a Using SourceMap for location output (#2736) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP using SourceMap with SourceManager. * Add a test to check obfuscation map is working. --------- Co-authored-by: Yong He <yonghe@outlook.com> 27 March 2023, 17:57:42 UTC
2179480 Fix lowering crash in [BackwardDerivativeOf]. (#2737) Co-authored-by: Yong He <yhe@nvidia.com> 27 March 2023, 17:05:07 UTC
333968a Use c++17 standard (#2686) * Use c++17 standard * regenerate VS projects * Switch to using std::invoke 27 March 2023, 09:48:46 UTC
ffa7d05 Update slang-llvm (#2735) 26 March 2023, 23:39:51 UTC
d64ee86 Add PyTorch C++ binding generation. (#2734) * Add PyTorch C++ binding generation. * fix --------- Co-authored-by: Yong He <yhe@nvidia.com> 26 March 2023, 20:59:11 UTC
666af09 Switch to short circuiting semantics for scalar `?:` operator. (#2733) 25 March 2023, 03:17:46 UTC
7292edb Added `[BackwardDifferentiable]` tags for intrinsic + builtin methods (#2732) * Added higher-order differentiability decorators for built-ins + preliminary tests * Update diff.meta.slang 24 March 2023, 23:50:51 UTC
e794de0 Obfuscated source map writing (#2727) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP produce obfuscated source map and write when container is specified. * Make the sourcemap generated name stable. 24 March 2023, 13:56:59 UTC
03c1083 Fix nested bwdContextType lowering. (#2731) Co-authored-by: Yong He <yhe@nvidia.com> 24 March 2023, 11:33:51 UTC
56a84a0 Fix various autodiff crashes related to interface usage. (#2730) * Fix crash. * Fix `[ForwradDerivative]` on member functions. * Update comments. * Fix crash when [BackwardDerivative] is provided but not [ForwardDerivative]. * Allow calling dynamic dispatched generic method from differentiable func. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 24 March 2023, 05:42:59 UTC
e004511 AD: Fix type checking for higher-order custom derivatives definitions (#2729) * Fixed type coercion issue with higher-order user defined methods * Placed associated type lookup method in a loop * Update high-order-user-defined-derivative.slang * Revert changes to associated type lookup method 24 March 2023, 02:27:30 UTC
6e4eae1 Hack handling of primal insts that has a function type. (#2728) * Update diff-bwd material test * Minor update * Hack handling of primal insts that has a function type. --------- Co-authored-by: winmad <winmad.wlf@gmail.com> Co-authored-by: Yong He <yhe@nvidia.com> 24 March 2023, 00:16:32 UTC
50e7d97 Fix optimization pass not converging. (#2725) * Fix optimization pass not converging. * Fix. * Fix tests. --------- Co-authored-by: Yong He <yhe@nvidia.com> 23 March 2023, 23:59:02 UTC
85f0058 Fix scope fixing for address insts. (#2724) Co-authored-by: Yong He <yhe@nvidia.com> 23 March 2023, 18:37:29 UTC
34acec2 Fix generic lowering regression due to IR deduplication. (#2723) * Fix generic lowering. * Fix generic lowering regression due to IR deduplication. --------- Co-authored-by: Yong He <yhe@nvidia.com> 23 March 2023, 06:59:22 UTC
44ab095 Create a simplified Falcor material system in slang test (#2721) * Duplicate an example of differentiating Falcor's material system * Add a second BSDF * WIP: update test; grad didn't pass through * Finalize test --------- Co-authored-by: Lifan Wu <lifanw@nvidia.com> 23 March 2023, 05:04:28 UTC
259a015 Type legalization and autodiff bug fixes. (#2722) * Bug fixes. * Fix. * Only perform autodiff for functions whose derivative is actually used. * Fix loop optimize bug. * Fix high order diff. * Fix trivial diff func generation. * Fixes. * Cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com> 23 March 2023, 04:16:35 UTC
d4f99c8 Source map obfuscation (#2717) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP source map. * Split out handling of RttiTypeFuncs to a map type. * Make RttiTypeFuncsMap hold default impls. * Slightly more sophisticated RttiTypeFuncsMap * Source map decoding. * Fix tabs. * Fix asserts due to negative values. * Use less obscure mechanisms in SourceMap. * Source map decoding. Simplifying SourceMap usage. * First attempt at ouputting a source map as part of emit. * Added support for -source-map option. SourceMap is added to the artifact. * Small improvements around column calculation in SourceWriter. * Source Loc obuscation WIP. * Fix some issues around SourceMap obfuscation. * Split out obfuscation into its own file. * Keep obfuscated SourceMap even through serialization bottleneck. 22 March 2023, 16:04:33 UTC
d8a40ab [TreatAsDifferentiable] functions. (#2720) 22 March 2023, 04:29:13 UTC
8387673 Fix associated type resolution bug. (#2719) * Fix associated type resolution bug. * Fix. * Fix language server hinting messed up by breadcrumb nodes. --------- Co-authored-by: Yong He <yhe@nvidia.com> 22 March 2023, 03:03:12 UTC
5d2c5dd Fix IntVal type check. (#2718) * Fix IntVal type check. * add test case result. --------- Co-authored-by: Yong He <yhe@nvidia.com> 21 March 2023, 22:44:43 UTC
96caba7 Add texture tri-linear autodiff example. (#2715) * Add quad texture example. * delete output image * remove irrelavent files * update project files * fix * Update example. * Fix. * remove out-texture --------- Co-authored-by: Yong He <yhe@nvidia.com> 21 March 2023, 22:44:21 UTC
7f11f88 Add support for emitting cuda kernel and host functions. (#2712) * Add support for emitting cuda kernel and host functions. * Update test. * Fix cuda preamble emit. --------- Co-authored-by: Yong He <yhe@nvidia.com> 17 March 2023, 22:57:22 UTC
4b55bf6 Rework differentiability dataflow check. (#2711) Co-authored-by: Yong He <yhe@nvidia.com> 17 March 2023, 22:14:44 UTC
29abe39 Update 07-autodiff.md 17 March 2023, 17:53:48 UTC
8a61b9d Support for producing SourceMap on emit (#2707) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP source map. * Split out handling of RttiTypeFuncs to a map type. * Make RttiTypeFuncsMap hold default impls. * Slightly more sophisticated RttiTypeFuncsMap * Source map decoding. * Fix tabs. * Fix asserts due to negative values. * Use less obscure mechanisms in SourceMap. * Source map decoding. Simplifying SourceMap usage. * First attempt at ouputting a source map as part of emit. * Added support for -source-map option. SourceMap is added to the artifact. 17 March 2023, 15:05:15 UTC
9476d45 Fix Phi simplification bug. (#2710) * Fix Phi simplification bug. * Fix up. * Fix. * Fix. * Fix. * Fix. * Fix. * Fix test. * Fix test. --------- Co-authored-by: Yong He <yhe@nvidia.com> 17 March 2023, 06:46:14 UTC
77d3630 Fix name mangling of `FuncCallIntVal` in func signatures. (#2709) * Fix name mangling of `FuncCallIntVal` in func signatures. * Enhance the test. * Fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 17 March 2023, 05:17:51 UTC
fc9cba5 Add `[CudaDeviceExport]` to allow exporting CUDA device functions. (#2708) * Add `[CudaDeviceExport]` to allow exporting CUDA device functions. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 17 March 2023, 05:17:34 UTC
2fd1ac6 SourceMap encoding (#2706) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP source map. * Split out handling of RttiTypeFuncs to a map type. * Make RttiTypeFuncsMap hold default impls. * Slightly more sophisticated RttiTypeFuncsMap * Source map decoding. * Fix tabs. * Fix asserts due to negative values. * Use less obscure mechanisms in SourceMap. * Source map decoding. Simplifying SourceMap usage. 17 March 2023, 05:13:59 UTC
4cb899f Preliminary SourceMap support (#2701) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP source map. * Split out handling of RttiTypeFuncs to a map type. * Make RttiTypeFuncsMap hold default impls. * Slightly more sophisticated RttiTypeFuncsMap * Source map decoding. * Fix tabs. * Fix asserts due to negative values. * Use less obscure mechanisms in SourceMap. 16 March 2023, 19:19:20 UTC
1036d1a Add test case for `makeStruct` transcription. (#2705) * Add test case for `makeStruct` transcription. * Update documentation on `no_diff`. * Update toc --------- Co-authored-by: Yong He <yhe@nvidia.com> 16 March 2023, 18:06:01 UTC
b92f280 Support GL_EXT_fragment_shader_barycentric (#2704) * Support GL_EXT_fragment_shader_barycentric * Support pervertex with GL_EXT_fragment_shader_barycentric 16 March 2023, 18:05:33 UTC
e960534 Update 07-autodiff.md 16 March 2023, 06:31:09 UTC
f7431f9 Fix `transcribeConstruct` for `makeStruct`. (#2703) Co-authored-by: Yong He <yhe@nvidia.com> 16 March 2023, 06:26:14 UTC
3a1a6c4 Extend DCE to handle pure function calls that returns via `inout` parameters. (#2700) 16 March 2023, 03:53:48 UTC
71efd94 AD: Primal-Hoisting Rework + Checkpoint Policy Framework (#2702) 16 March 2023, 02:26:58 UTC
38e6219 Update 07-autodiff.md 15 March 2023, 18:12:15 UTC
bf30824 Properly implement differential witness of intermediate context type. (#2699) * Properly implement differential witness of intermediate context type. * Modify test to include a loop. --------- Co-authored-by: Yong He <yhe@nvidia.com> 15 March 2023, 16:39:21 UTC
176eaa9 Update 07-autodiff.md 14 March 2023, 16:33:16 UTC
e291f60 Support `fwd_diff(bwd_diff(f))`. (#2697) * Support `fwd_diff(bwd_diff(f))`. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 14 March 2023, 16:31:51 UTC
a911ca6 Support high order diff pattern: `bwd_diff(fwd_diff(f))`. (#2695) * Support high order diff pattern: `bwd_diff(fwd_diff(f))`. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 13 March 2023, 17:57:28 UTC
3fea56e Support for PDB output from DXC (#2693) * #include an absolute path didn't work - because paths were taken to always be relative. * Add versioning to CompileOptions for DownstreamCompiler so we can add new options without breaking binary interface. * Add support for debug info format to API/command line processing. * Small simplification. * Add support for adding PDB output from a compilation. * Use builtin offset of directly. * Fix typo in debug. 10 March 2023, 19:19:48 UTC
e39893e Add struct version to DownstreamCompiler::CompileOptions interface (#2692) * #include an absolute path didn't work - because paths were taken to always be relative. * Add versioning to CompileOptions for DownstreamCompiler so we can add new options without breaking binary interface. * Use builtin offset of directly. 10 March 2023, 17:24:51 UTC
e06cfb3 Update restrictions sections in autodiff doc. (#2694) * Update restrictions section in autodiff doc. * Update restrictions sections in autodiff doc. --------- Co-authored-by: Yong He <yhe@nvidia.com> 09 March 2023, 23:53:51 UTC
a611d4b Update user guide on `[PrimalSubstitute]` 09 March 2023, 23:18:36 UTC
86fc50c Add support for `[PrimalSubstitute]` and `[PrimalSubstituteOf]`. (#2691) * Add support for `[PrimalSubstitute]` and `[PrimalSubstituteOf]`. * Fix * Fix. * Cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com> 09 March 2023, 05:52:34 UTC
257733f Reuse higher-order `ResolveInvoke` logic to resolve func refs in `[*DerivativeOf]` attribs. (#2688) * Reuse higher-order `ResolveInvoke` logic to resolve func refs in [*DerivativeOf] attribs. * Add diff implementation matrix versions of binary and ternary intrinsics. * Add diff impl for legacy intrinsics. * Fix diagnostics of using non-differentiable function in a diff operator. * Add diff implementation for `determinant`. --------- Co-authored-by: Yong He <yhe@nvidia.com> 07 March 2023, 19:22:32 UTC
6f31eae Implement derivatives for HLSL intrinsics. (#2684) * Implement derivatives for HLSL intrinsics. * Vector intrinsics. * Add all intrinsics. --------- Co-authored-by: Yong He <yhe@nvidia.com> 01 March 2023, 21:19:33 UTC
6c26aa1 Improve diagnostic on differentiablitiy check. (#2687) Co-authored-by: Yong He <yhe@nvidia.com> 01 March 2023, 20:59:51 UTC
3c32dd9 AD: Fixed do-while loops (#2683) * WIP: Fix for do-while loops * Added a somewhat hacky fix for do-while loops * Redid the indexed region map builder step to fix issue with the nested loops test * rename * Used managed pointers 01 March 2023, 02:24:24 UTC
7eeda30 Fixes to GitHub Windows CI build (#2664) 28 February 2023, 23:10:14 UTC
f7db44a Add `SourceBlobWithPathInfoArtifactRepresentation`. (#2682) 28 February 2023, 23:09:19 UTC
f23e362 Diagnose on storing differentiable value into non-differentiable location. (#2681) 28 February 2023, 05:21:39 UTC
10e2d9c More fixes for reverse-mode on complicated loops (#2675) * Multiple fixes to get various loop tests to pass. * Create reverse-nested-loop.slang * Fix for variables becoming inaccessible during cfg normalization * Removed comments and moved break-branch-normalization to eliminateMultiLevelBreaks * Fix. * Override liveness tests 28 February 2023, 04:42:06 UTC
a3ba22b Detect and deduplicate read-only resource access. (#2680) * Detect and deduplicate read-only resource access. * Fix tests. * Fix tests. --------- Co-authored-by: Yong He <yhe@nvidia.com> 27 February 2023, 23:18:07 UTC
b1b76f0 Added support for `kIROp_Select` (#2679) 25 February 2023, 07:23:41 UTC
85c1569 Support dynamic dispatch a backward differentiable function. (#2678) Co-authored-by: Yong He <yhe@nvidia.com> 24 February 2023, 22:33:32 UTC
91694da Fix differential type registration through non-differentiable type. (#2677) * Fix differential type registration through non-differentiable type. * More fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 24 February 2023, 21:22:07 UTC
bd6306c More control flow simplifications. (#2673) * More control flow and Phi param simplifications. * Fix. * Fix gcc error. * Fix. * More IR cleanup. * Fix bug in phi param dce + ifelse simplify. * Propagate and DCE side-effect-free functions. * Enhance CFG simplifcation to remove loops with no side effects. * Fix. * Fixes. * Fix tests. Add [__AlwaysFoldIntoUseSite] for rayPayloadLocation. * More cleanup. * Fixes. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 24 February 2023, 18:01:47 UTC
e8c08e7 Fixed hoisting of intermediate array & context vars (#2674) Also added legalization for loops 23 February 2023, 03:22:26 UTC
6eb0b4d Reverse-mode AD fixes for loops with non-trivial break region (#2671) * Fix crash when applying autodiff to functions with no arguments * Fixes for loops where the break region is non-trivial * Minor fix * Implement array legalization correctly. * Fix array legalization. --------- Co-authored-by: Yong He <yhe@nvidia.com> 23 February 2023, 00:33:42 UTC
0ef7aa8 Fix transposeCall. (#2669) * Modify control-flow test case * Update reverse-control-flow-3.slang * Fix `transposeCall`. * Fix. --------- Co-authored-by: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Co-authored-by: Yong He <yhe@nvidia.com> 21 February 2023, 20:51:46 UTC
6bca0ec Added support for simple while loops (#2667) * Added support for simple while loops * Fix support for while loops by changing logic to grab the loop update block 21 February 2023, 16:37:15 UTC
e5bec2f Take into account the optimization level requested in TargetDesc (#2649) * Take into account the optimization level requested in TargetDesc Combines conflicting optimization levels by taking the maximum between them; as such they now each represent the lower bound on the eventual optimization level. Most of the changes are making this clear by s/optimizationLevel/minimumOptimizationLevel Closes https://github.com/shader-slang/slang/issues/2324 * Remove optimization level from TargetDesc 21 February 2023, 03:46:21 UTC
47715e6 Miscellaneous backward autodiff fixes. (#2665) * Fix differentiable type registration * Fix use of non-differentiable return value in a differentiable func. * Fix use of primal inst that does not dominate the diff block. * Fix primal inst hoisting, and add missing type legalization logic. * Make `detach` defined on all differentiable T. --------- Co-authored-by: Yong He <yhe@nvidia.com> 20 February 2023, 22:42:50 UTC
8b05df4 Add static for loop iteration inference. (#2659) 20 February 2023, 18:17:00 UTC
a8da735 Allocate N+1 arrays instead of N to avoid out-of-bounds access when unzipping loops (#2663) 18 February 2023, 00:03:52 UTC
92ccc8f AD: More legacy type handling cleanup + user-defined reverse-mode fix (#2662) * WIP: Remove all legacy type checking * Fixed issue with user-defined backward derivatives not bypassing the AD process --------- Co-authored-by: Yong He <yonghe@outlook.com> 17 February 2023, 23:02:58 UTC
5cd39d1 AD: Remove the original loop condition upon inversion (#2661) * Remove the original condition upon loop inversion (it's redundant, and causes out-of-bounds accesses) * minor fix (also removed the first loop check skip) * Cleanup unused insts * minor comment fix 17 February 2023, 22:56:07 UTC
0516073 Fixed crash when lowering IR for no_diff struct member. (#2658) * Fixed crash when lowering IR for no_diff struct member. * Improve `setInsertBeforeOrdinaryInst` and `setInsertAfterOrdinaryInst`. --------- Co-authored-by: Yong He <yhe@nvidia.com> 17 February 2023, 21:23:27 UTC
79049bc Cleaned up legacy differential type handling + type casting bugfixes (#2660) 17 February 2023, 21:22:47 UTC
back to top