| Age | Commit message (Collapse) | Author |
|
* Add support for `[PrimalSubstitute]` and `[PrimalSubstituteOf]`.
* Fix
* Fix.
* Cleanup.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
`[*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>
|
|
* Implement derivatives for HLSL intrinsics.
* Vector intrinsics.
* Add all intrinsics.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* 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
|
|
|
|
(#2681)
|
|
* 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
|
|
* Detect and deduplicate read-only resource access.
* Fix tests.
* Fix tests.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Fix differential type registration through non-differentiable type.
* More fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* 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>
|
|
Also added legalization for loops
|
|
* 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>
|
|
* 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>
|
|
* Added support for simple while loops
* Fix support for while loops by changing logic to grab the loop update block
|
|
* 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>
|
|
|
|
unzipping loops (#2663)
|
|
* 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>
|
|
* 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
|
|
* Fixed crash when lowering IR for no_diff struct member.
* Improve `setInsertBeforeOrdinaryInst` and `setInsertAfterOrdinaryInst`.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
|
|
* 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)`
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* Overhaul global inst deduplication and cpp/cuda backend.
* Update IR documentation.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* #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.
|
|
* #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
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
(#2641)
Fixes https://github.com/shader-slang/slang/issues/2189
|
|
|
|
* Fix checking of `[BackwardDerivativeOf]` attribute.
* Fix crash in `canInstHaveSideEffectAtAddress`.
* Fix.
* Revert fix.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
* 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
|
|
|
|
* Add Slang::List::stableSort
* Use stable sort in generation of lookup tables
* Disable newline translation when writing lookup tables
|
|
* 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>
|
|
|
|
* Fix crash when processing nested switch.
* Clean up.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
|
|
* 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>
|
|
* #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.
|
|
* 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
|
|
* Support `out` parameters in backward differentiation.
* Fixes.
* Fix cleanup.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
(#2617)
|
|
* Add transposition logic for constructor opcodes.
* Fix.
* Add language server regression test.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
|
|
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>
|