summaryrefslogtreecommitdiffstats
path: root/tests/autodiff/nested-jvp.slang
Commit message (Collapse)AuthorAge
* Fix 7723 - Add autodiff tests (#7919)Harsh Aggarwal (NVIDIA)2025-08-06
| | | | | | | * Fix 7723 - Add autodiff tests * Update bug-1.slang Adding Vulkan
* Use property for `DifferentialPair` accessors. (#2493)Yong He2022-11-04
|
* Make `DifferentialPair` able to nest. (#2477)Yong He2022-11-01
|
* Rename `[__custom_jvp]` -> `[ForwardDerivative]`. (#2473)Yong He2022-10-27
| | | | | | | | | * Rename `[__custom_jvp]` -> `[ForwardDerivative]`. * Rename the classes. * More renaming. Co-authored-by: Yong He <yhe@nvidia.com>
* Rename `JVPDerivativeModifier` -> `ForwardDifferentiableAttribute`. (#2472)Yong He2022-10-27
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Rename `__jvp`-->`__fwd_diff`. (#2471)Yong He2022-10-27
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Added a new differential type system and various improvements (#2343)Sai Praveen Bangaru2022-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge slang-ir-diff-jvp.cpp * Added support and tests for other float vector types * Added swizzle test and code to handle it (tests failing currently) * Fixed one test, the other is still pending * Fixed instruction cloning logic to avoid modifying original function * Fixed an issue with custom 'pow_jvp' and added support for vector contructor * Minor update to comments * Fixed support for division * Fixed an issue with uninitialized diagnostic sink * Moved derivative processing to after mandatory inlining. Skip instructions that don't have side-effects and aren't used by anything. * WIP: Handling unconditional control flow and multi-block functions * Support for unconditional multi-block functions * Added a dead code elimination step to the derivative pass * Changed name of 'hasNoSideEffects()' * Refactored variable names * Added initial IR defs for new type system * Added necessary logic for semantic checking * Overhauled type system to use builtin pair types and conform to the IDifferentiable interface * Automatically replace IRDifferentiablePairType to a custom IRStructType * Added generics handling by expanding the conformance context functionality and allowing for type parameters * Minor fix: early return in processPairTypes() * Minor fixes to differentiable resolution on generic types * Added new instructions for differential pairs. Basic tests work now. Looking into generic types. * Adjusted most tests to the new type system. OutType and InOutType are still not properly working. * Updated __jvp to produce both primal and differential output * Moved autodiff related declarations to diff.meta.slang * Refactored variable names * Added initial IR defs for new type system * Added necessary logic for semantic checking * Overhauled type system to use builtin pair types and conform to the IDifferentiable interface * Automatically replace IRDifferentiablePairType to a custom IRStructType * Added generics handling by expanding the conformance context functionality and allowing for type parameters * Minor fix: early return in processPairTypes() * Minor fixes to differentiable resolution on generic types * Added new instructions for differential pairs. Basic tests work now. Looking into generic types. * Adjusted most tests to the new type system. OutType and InOutType are still not properly working. * Updated __jvp to produce both primal and differential output * Moved autodiff related declarations to diff.meta.slang * Removed external changes * Cleanup the transcription logic: each case returns a pair of insts for the primal and differential computation.
* Added forward-mode autodiff support for more instructions (#2331)Sai Praveen Bangaru2022-07-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Merge slang-ir-diff-jvp.cpp * Added support and tests for other float vector types * Added swizzle test and code to handle it (tests failing currently) * Fixed one test, the other is still pending * Fixed instruction cloning logic to avoid modifying original function * Fixed an issue with custom 'pow_jvp' and added support for vector contructor * Minor update to comments * Fixed support for division * Fixed an issue with uninitialized diagnostic sink * Moved derivative processing to after mandatory inlining. Skip instructions that don't have side-effects and aren't used by anything. * WIP: Handling unconditional control flow and multi-block functions * Support for unconditional multi-block functions * Added a dead code elimination step to the derivative pass * Changed name of 'hasNoSideEffects()'
* Added support for differentiating calls to basic functions, as well as ↵Sai Praveen Bangaru2022-07-11
arithmetic on the float3 type (#2313) * Added support for differentiating calls to basic functions, as well as arithmetic on the float3 type * Added test expected result