summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-13Eliminate `continue` to allow unrolling any loops. (#2645)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-13Add Loop Unrolling Pass. (#2644)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-11Update README.md on auto diff feature.Yong He
2023-02-11Update 07-autodiff.mdYong He
2023-02-11Update 07-autodiff.mdYong He
2023-02-11Update 07-autodiff.mdYong He
2023-02-11Take into account existing initializer list type when performing coercions ↵Ellie Hermaszewska
(#2641) Fixes https://github.com/shader-slang/slang/issues/2189
2023-02-11Comment call to vkCreateInstance with a potential pitfall (#2642)Ellie Hermaszewska
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.
2023-02-10Fix several autodiff bugs. (#2643)Yong He
2023-02-10Fix checking of `[BackwardDerivativeOf]` attribute. (#2640)Yong He
* Fix checking of `[BackwardDerivativeOf]` attribute. * Fix crash in `canInstHaveSideEffectAtAddress`. * Fix. * Revert fix. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-09Reverse-mode Loop Support (#2635)Sai Praveen Bangaru
* 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
2023-02-09Fixed derivatives for kIROp_Neg and kIROp_Div, added another test (#2639)Sai Praveen Bangaru
2023-02-09Use stable sort in generation of lookup tables (#2638)Ellie Hermaszewska
* Add Slang::List::stableSort * Use stable sort in generation of lookup tables * Disable newline translation when writing lookup tables
2023-02-08Update 07-autodiff.mdYong He
2023-02-08Replace \cal with \mathbb (#2637)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-08Update autodiff documentation with more precise math definitions. (#2636)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-07Add backward derivatives for functions in diff.meta.slang (#2633)winmad
* 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>
2023-02-07Arithmetic simplifications and more IR clean up logic. (#2632)Yong He
2023-02-06Update documentation (#2631)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06Fix documentation (#2630)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06Update documentation TOC (#2629)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06Improve autodiff documentation (#2628)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06Fixup documentation (#2627)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06Add documentation for autodiff feature (#2626)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06GFX: make dispatch commands return error code. (#2625)Yong He
* GFX: make dispatch commands return error code. * Fix cuda. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-06Fix crash when processing nested switch. (#2624)Yong He
* Fix crash when processing nested switch. * Clean up. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-04Patch transcription of `inout` non differentiable params. (#2623)Yong He
2023-02-03Overhaul `transposeParameterBlock` to support `inout` params. (#2621)Yong He
* 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>
2023-02-03Small fixes around repro (#2622)jsmall-nvidia
* #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.
2023-02-03Correct indentation in premake lua (#2620)Ellie Hermaszewska
No semantic change
2023-02-03Use SPIR-V opcode names rather than numbers (#2571)Ellie Hermaszewska
* 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
2023-02-01Support `out` parameters in backward differentiation. (#2619)Yong He
* Support `out` parameters in backward differentiation. * Fixes. * Fix cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-01Use gmake2 as a premake target over gmake (#2587)Ellie Hermaszewska
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...
2023-01-31Patched support for multi-return and fallthrough if-else with break stmts ↵Sai Praveen Bangaru
(#2617)
2023-01-30Add transposition logic for constructor opcodes. (#2618)Yong He
* Add transposition logic for constructor opcodes. * Fix. * Add language server regression test. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-01-30Make ArrayExpressionType a DeclRefType and define its autodiff extension in ↵Yong He
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>
2023-01-30Overhauled reverse-mode control flow handling (#2608)Sai Praveen Bangaru
* Added switch-case support; fixed non-diff parameter transposition * Made region propagation much more robust. Partial loop unzip implementation * WIP: Added most loop handling code, and a test. Still untested * Added CFG Normalization pass + CFG Reversal Pass + Loop Unzipping + most loop transcription * Add single-iter-loop test. * proj files * removed comments * Update reverse-loop.slang * Removed out-of-date code * Disabled IR validation during constructSSA phase of normalizeCFG. constructSSA now reuses sharedBuilder * Moved normalizeCFG() call to prepareFuncForBackwardDiff()
2023-01-27Register allocation during phi elimination. (#2613)Yong He
* Register allocation during phi elimination. * Enhance the test case. * Cleanup line breaks in test case. * remove unncessary line break changes. * More cleanups. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-01-27Add ASAN support + fixes (#2614)skallweitNV
* Add ASAN support to premake * Fix StringRepresentation when ASAN is enabled * Fix deep recursion in slang-generate * Fix hello-world example * Fix gpu-printing example * Linux fix * Try fixing linux * Add missing include
2023-01-26Format premake5.lua (#2612)skallweitNV
2023-01-25Unify UpdateField and UpdateElement with access chain. (#2611)Yong He
* Unify UpdateField and UpdateElement with access chain. * Fix warnings. Co-authored-by: Yong He <yhe@nvidia.com>
2023-01-25Cleanup IR representation of interface member derivative. (#2610)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-01-25GFX report live objects (#2609)skallweitNV
* Add utility to call D3D ReportLiveObjects * Add gfxReportLiveObjects API call * Only warn on swapchain image references
2023-01-24Reimplement address elimination. (#2605)Yong He
* Reimplement address elimination pass. * Fix error. * Update test references. Co-authored-by: Yong He <yhe@nvidia.com>
2023-01-24Small fix for "static" in doc output (#2606)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Upgrade to slang-llvm-13.x-33 * Kick - as build failed on download egress. * Output "static" on methods in doc output.
2023-01-23Full address insts elimination for backward autodiff. (#2604)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-01-20Add vulkan extensions to support DLSS (#2603)skallweitNV
2023-01-19Add diagnostic for calling non-bwd-diff func from bwd-diff func. (#2602)Yong He
2023-01-18Upgrade slang-llvm-13.x-33 (#2600)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Upgrade to slang-llvm-13.x-33 * Kick - as build failed on download egress.
2023-01-17First custom backward-derivative test case working. (#2598)Yong He