summaryrefslogtreecommitdiffstats
path: root/tests/autodiff/generic-impl-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
* Feature/initialize list side branch (#6058)kaizhangNV2025-02-05
| | | | | | | | | | | | | | | | | | | | | | * SP004: implement initialize list translation to ctor - We synthesize a member-wise constructor for each struct follow the rules described in SP004. - Add logic to translate the initialize list to constructor invoke - Add cuda-host decoration for the synthesized constructor - Remove the default constructor when we have a valid member init constructor - Disable -zero-initialize option, will re-implement it in followup (#6109). - Fix the overload lookup issue When creating invoke expression for ctor, we need to call ResolveInvoke() to find us the best candidates, however the existing lookup logic could find us the base constructor for child struct, we should eliminate this case by providing the LookupOptions::IgnoreInheritance to lookup, this requires us to create a subcontext on SemanticsVisitor to indicate that we only want to use this option on looking the constructor. - Do not implicit initialize a struct that doesn't have explicit default constructor. Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Various fixes around differentiable member associations ↵Sai Praveen Bangaru2024-07-10
| | | | | | | | | | | | | | | | `[DerivativeMember(<diff-member>)]` (#4525) * Add diagnostic for missing diff-member associations + Automatically create diff member associations if differential type is the same as the primal type. + Move diff-member attribute checking to conformance-checking phase to avoid circularity issues. Fixes #4103 * Update slang-check-decl.cpp --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Redesign `DeclRef` and systematic `Val` deduplication (#3049)Yong He2023-08-04
| | | | | | | | | | | | | | | | | | | | | | | * Redesign DeclRef + Deduplicate Val. * Update project files * Fix warning. * Fix. * Fix. * Remove `Val::_equalsImplOverride`. * Rmove `Val::_getHashCodeOverride`. * Remove `semanticVisitor` param from `resolve`. * Cleanups. --------- Co-authored-by: Yong He <yhe@nvidia.com>
* Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` (#3029)Sai Praveen Bangaru2023-07-26
| | | | | | | | | | * Refactor `dmul(This, Differential)` to `dmul<T:Real>(T, Differential)` - Add AST synthesis support for generic containers - Refactor relevant tests * Merge dmul synthesis with dadd and dzero, and disambiguate using an enum * Fix trailing spaces
* Add static for loop iteration inference. (#2659)Yong He2023-02-20
|
* Make differentiable data-flow pass recognize interface methods. (#2530)Yong He2022-11-23
| | | | | | | * Make differentiable data-flow pass recognize interface methods. * Make existing test to work with `[TreatAsDifferentiable]`. Co-authored-by: Yong He <yhe@nvidia.com>
* Use property for `DifferentialPair` accessors. (#2493)Yong He2022-11-04
|
* Higher order differentiation. (#2487)Yong He2022-11-04
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Remove unnecessary `:IDifferentiable` conformance in tests. (#2482)Yong He2022-11-01
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* Make `DifferentialPair` able to nest. (#2477)Yong He2022-11-01
|
* Rename 'IDifferentiable.zero' -> `IDifferentiable.dzero`. (#2474)Yong He2022-10-27
| | | Co-authored-by: Yong He <yhe@nvidia.com>
* 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>
* Rework differentiation of member access through ↵Yong He2022-10-24
| | | | | | | | | | | | | | | | | | | `[DerivativeMember(DiffType.field)]` (#2460) * wip: remove auto-diff for member access, add diff through property accessors. * Fix getter-setter test. * Fix getter-setter-multi test. * Fix nested-jvp test. * Use [DerivativeMember] attribute to differentiate through member access. * Clean up. * More cleanup. Co-authored-by: Yong He <yhe@nvidia.com>
* Modified the new type system to support generic differentiable types … (#2413)Sai Praveen Bangaru2022-10-20
* Modified the new type system to support generic differentiable types and added support for differentiating overloaded functions. * Changed a few asserts to release asserts to avoid unreferenced variable errors * Fixed a naming issue with TypeWitnessBreadcumb::Flavor::Decl * Added logic to avoid tracking differentiable types if the module does not use auto-diff or define differentiable types. * Moved the auto-diff passes to after the specialization step, added a more complex generics test * Added a generics stress test and fixed AST-side logic. IR side needs some more work * Added differential getter and setter logic, fixed multiple issues with DifferentiableTypeDictionary, added support for loops and conditions * Changed differential getters to use pointer types, added getter type checking * Fixed some bugs related to diff type registration and differential getters * Removed some superfluous code * Removed some more unused code. * Fixed an issue with witness substitution * Minor fix Co-authored-by: Yong He <yonghe@outlook.com>