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

sort by:
Revision Author Date Message Commit Date
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
f253d15 Proper reverse-mode loop handling with splitting + inversion steps (#2656) * Halfway to loop inversion * More progress towards proper loop inversion * More progress towards inverse insts. Only thing left is adding `counter>=0` at the right place * More fixes for inversion step. * Lots more fixes, added primal inst 'hoisting' mechanism as the central method that ensures primal values are placed in the right spot * Loop inversion is now functional * Cleaned up commented code * rename diffCounterVar -> diffCounterParam * minor update * removed some comments and commented code * Switch `IRBuilder(sharedIRBuilder)` to `IRBuilder(moduleInst)` 17 February 2023, 17:03:59 UTC
245466d Remove `SharedIRBuilder`. (#2657) Co-authored-by: Yong He <yhe@nvidia.com> 17 February 2023, 00:44:04 UTC
4c4826d Overhaul global inst deduplication and cpp/cuda backend. (#2654) * Overhaul global inst deduplication and cpp/cuda backend. * Update IR documentation. --------- Co-authored-by: Yong He <yhe@nvidia.com> 16 February 2023, 21:55:32 UTC
eda88e5 Design doc on IR deduplication and best practices when working with IR 16 February 2023, 20:44:32 UTC
8667515 Treat user defined backward derivative function as non differentiable. (#2650) Co-authored-by: Yong He <yhe@nvidia.com> 16 February 2023, 01:18:00 UTC
266dc66 Upgrade to GLSLANG 12.0.0 binaries (#2652) * #include an absolute path didn't work - because paths were taken to always be relative. * Upgrade GLSLANG binaries to 12.0.0 15 February 2023, 21:02:11 UTC
f13e080 Upgrade GLSLANG 12.0.0 (#2651) * #include an absolute path didn't work - because paths were taken to always be relative. * Update to glslang 12.0.0. Update SPIRV-Tools SPIRV-Headers. 15 February 2023, 19:32:50 UTC
598e07f Preliminary Shader Execution Reordering Doc (#2648) * #include an absolute path didn't work - because paths were taken to always be relative. * Add preliminary Shader Execution Reordering doc. Update target-compatibility docs. * Fix debugBreak. 14 February 2023, 23:30:04 UTC
b92a75d Preliminary debugBreak support (#2647) * #include an absolute path didn't work - because paths were taken to always be relative. * Preliminary support for debug break. * Add C++ debug break support. Add details about usage. * Improve debug break test details. * Make HLSL output a comment about no support. * Handle specialize for target assert, without a body if it has spv_instruction/target intrinsic 14 February 2023, 21:21:07 UTC
ec49215 Various auto-diff bug fixes. (#2646) Co-authored-by: Yong He <yhe@nvidia.com> 13 February 2023, 19:05:29 UTC
977eb92 Eliminate `continue` to allow unrolling any loops. (#2645) Co-authored-by: Yong He <yhe@nvidia.com> 13 February 2023, 18:39:12 UTC
4dbc74a Add Loop Unrolling Pass. (#2644) Co-authored-by: Yong He <yhe@nvidia.com> 13 February 2023, 18:38:14 UTC
57af2c1 Update README.md on auto diff feature. 12 February 2023, 06:48:18 UTC
77706b7 Update 07-autodiff.md 11 February 2023, 21:30:18 UTC
5bab4ea Update 07-autodiff.md 11 February 2023, 21:20:37 UTC
82c7c78 Update 07-autodiff.md 11 February 2023, 21:19:15 UTC
94b2c67 Take into account existing initializer list type when performing coercions (#2641) Fixes https://github.com/shader-slang/slang/issues/2189 11 February 2023, 05:57:35 UTC
c7f486c Comment call to vkCreateInstance with a potential pitfall (#2642) Although we could in principle write this explanatory message to stderr, that would entangle this call with the layer search above for what is probably a very unlikely possibility on any normal system. 11 February 2023, 04:16:56 UTC
aec57d8 Fix several autodiff bugs. (#2643) 11 February 2023, 02:46:57 UTC
6e7b424 Fix checking of `[BackwardDerivativeOf]` attribute. (#2640) * Fix checking of `[BackwardDerivativeOf]` attribute. * Fix crash in `canInstHaveSideEffectAtAddress`. * Fix. * Revert fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com> 10 February 2023, 17:01:59 UTC
df02f3f Reverse-mode Loop Support (#2635) * Full loop support now working. MaxItersAttr in progress * Lookup table updates? * Fixed the max iters decoration * Minox fixes & remove superfluous code * fixup warnings * Revert "Lookup table updates?" This reverts commit 7d9b0793fb5239f31d1155776e846dcf1892d8d9. * Update 07-autodiff.md * Change maxiters to MaxIters * Added asserts * Update 07-autodiff.md 09 February 2023, 22:40:20 UTC
d911e1b Fixed derivatives for kIROp_Neg and kIROp_Div, added another test (#2639) 09 February 2023, 22:19:55 UTC
fbe31ad Use stable sort in generation of lookup tables (#2638) * Add Slang::List::stableSort * Use stable sort in generation of lookup tables * Disable newline translation when writing lookup tables 09 February 2023, 05:16:30 UTC
6bbd673 Update 07-autodiff.md 08 February 2023, 21:35:43 UTC
f2e564c Replace \cal with \mathbb (#2637) Co-authored-by: Yong He <yhe@nvidia.com> 08 February 2023, 21:20:17 UTC
80b1b37 Update autodiff documentation with more precise math definitions. (#2636) Co-authored-by: Yong He <yhe@nvidia.com> 08 February 2023, 21:04:32 UTC
b1d7dc0 Add backward derivatives for functions in diff.meta.slang (#2633) * WIP: start adding backward derivatives * Overhaul `transposeParameterBlock` to support `inout` params. * Small bug fixes. * Bug fix on differentiable intrinsic specialization. * Fixes. * Run autodiff tests on CPU. * Clean up. * Overhaul `transposeParameterBlock` to support `inout` params. * Small bug fixes. * Bug fix on differentiable intrinsic specialization. * Fixes. * Run autodiff tests on CPU. * Clean up. * More bug fixes., * WIP: working on detach * Arithmetic simplifications and more IR clean up logic. * WIP: adding detach and abs * Fix detach and abs * Fix. * Add IR transform pass for cleaner code emit. * Fix test cases. * Fix type system logic for reference type. * Add backward derivatives for functions that already have forward derivatives * Fix changes --------- Co-authored-by: Yong He <yhe@nvidia.com> Co-authored-by: Lifan Wu <lifanw@nvidia.com> 08 February 2023, 06:30:00 UTC
4be623c Arithmetic simplifications and more IR clean up logic. (#2632) 08 February 2023, 02:36:35 UTC
101f164 Update documentation (#2631) Co-authored-by: Yong He <yhe@nvidia.com> 07 February 2023, 00:11:49 UTC
f12d422 Fix documentation (#2630) Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 23:56:48 UTC
49d68bf Update documentation TOC (#2629) Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 23:45:17 UTC
fe5cd24 Improve autodiff documentation (#2628) Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 23:37:47 UTC
7ecdf54 Fixup documentation (#2627) Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 22:44:19 UTC
e84c891 Add documentation for autodiff feature (#2626) Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 22:35:27 UTC
5ede9a3 GFX: make dispatch commands return error code. (#2625) * GFX: make dispatch commands return error code. * Fix cuda. --------- Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 22:34:19 UTC
e893a83 Fix crash when processing nested switch. (#2624) * Fix crash when processing nested switch. * Clean up. --------- Co-authored-by: Yong He <yhe@nvidia.com> 06 February 2023, 18:07:02 UTC
a12c551 Patch transcription of `inout` non differentiable params. (#2623) 05 February 2023, 04:07:14 UTC
228e71d Overhaul `transposeParameterBlock` to support `inout` params. (#2621) * Overhaul `transposeParameterBlock` to support `inout` params. * Small bug fixes. * Bug fix on differentiable intrinsic specialization. * Fixes. * Run autodiff tests on CPU. * Clean up. * More bug fixes., * Add test coverage on inout param. * Fix language server hinting for transcribed mutable params. --------- Co-authored-by: Yong He <yhe@nvidia.com> 04 February 2023, 00:44:33 UTC
ee49a62 Small fixes around repro (#2622) * #include an absolute path didn't work - because paths were taken to always be relative. * Fix issues in repo due to C++ expression evaluation ordering is undefined. 03 February 2023, 22:11:12 UTC
1890836 Correct indentation in premake lua (#2620) No semantic change 03 February 2023, 04:19:10 UTC
a00dc69 Use SPIR-V opcode names rather than numbers (#2571) * s/emititng blobal/emitting global * Use SPIR-V opcode names rather than numbers * regenerate Visual Studio project files * Use names for extended SPIR-V GLSL instructions * Add missing operand for SPIR-V extended instruction * Add warning aginst modifying generated hashing files * Squash warnings on MSVC 03 February 2023, 04:18:49 UTC
bbd1e17 Support `out` parameters in backward differentiation. (#2619) * Support `out` parameters in backward differentiation. * Fixes. * Fix cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com> 01 February 2023, 22:18:57 UTC
c5895fb Use gmake2 as a premake target over gmake (#2587) The gmake generator has been deprecated by gmake2 https://premake.github.io/docs/Using-Premake/#using-premake-to-generate-project-files gmake2 has better dependency handling around our custom rules leading in fewer runs of slang-generate etc... 01 February 2023, 15:32:40 UTC
e312d5c Patched support for multi-return and fallthrough if-else with break stmts (#2617) 31 January 2023, 08:26:59 UTC
77cdbb2 Add transposition logic for constructor opcodes. (#2618) * Add transposition logic for constructor opcodes. * Fix. * Add language server regression test. --------- Co-authored-by: Yong He <yhe@nvidia.com> 31 January 2023, 04:03:46 UTC
499b025 Make ArrayExpressionType a DeclRefType and define its autodiff extension in stdlib. (#2615) * Allow array parameters in forward diff. * Use type canonicalization instead of coersion. * Reimplement array type. * Fix. * Update test case. --------- Co-authored-by: Yong He <yhe@nvidia.com> 31 January 2023, 03:24:09 UTC
back to top