summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-16Support GL_EXT_fragment_shader_barycentric (#2704)Samuel Kogler
* Support GL_EXT_fragment_shader_barycentric * Support pervertex with GL_EXT_fragment_shader_barycentric
2023-03-15Update 07-autodiff.mdYong He
2023-03-15Fix `transcribeConstruct` for `makeStruct`. (#2703)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-15Extend DCE to handle pure function calls that returns via `inout` ↵Yong He
parameters. (#2700)
2023-03-15AD: Primal-Hoisting Rework + Checkpoint Policy Framework (#2702)Sai Praveen Bangaru
2023-03-15Update 07-autodiff.mdYong He
2023-03-15Properly implement differential witness of intermediate context type. (#2699)Yong He
* Properly implement differential witness of intermediate context type. * Modify test to include a loop. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-14Update 07-autodiff.mdYong He
2023-03-14Support `fwd_diff(bwd_diff(f))`. (#2697)Yong He
* Support `fwd_diff(bwd_diff(f))`. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-13Support high order diff pattern: `bwd_diff(fwd_diff(f))`. (#2695)Yong He
* Support high order diff pattern: `bwd_diff(fwd_diff(f))`. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-10Support for PDB output from DXC (#2693)jsmall-nvidia
* #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.
2023-03-10Add struct version to DownstreamCompiler::CompileOptions interface (#2692)jsmall-nvidia
* #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.
2023-03-09Update restrictions sections in autodiff doc. (#2694)Yong He
* Update restrictions section in autodiff doc. * Update restrictions sections in autodiff doc. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-09Update user guide on `[PrimalSubstitute]`Yong He
2023-03-08Add support for `[PrimalSubstitute]` and `[PrimalSubstituteOf]`. (#2691)Yong He
* Add support for `[PrimalSubstitute]` and `[PrimalSubstituteOf]`. * Fix * Fix. * Cleanup. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-07Reuse higher-order `ResolveInvoke` logic to resolve func refs in ↵Yong He
`[*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>
2023-03-01Implement derivatives for HLSL intrinsics. (#2684)Yong He
* Implement derivatives for HLSL intrinsics. * Vector intrinsics. * Add all intrinsics. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-03-01Improve diagnostic on differentiablitiy check. (#2687)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-28AD: Fixed do-while loops (#2683)Sai Praveen Bangaru
* 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
2023-02-28Fixes to GitHub Windows CI build (#2664)Theresa Foley
2023-02-28Add `SourceBlobWithPathInfoArtifactRepresentation`. (#2682)Yong He
2023-02-27Diagnose on storing differentiable value into non-differentiable location. ↵Yong He
(#2681)
2023-02-27More fixes for reverse-mode on complicated loops (#2675)Sai Praveen Bangaru
* 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
2023-02-27Detect and deduplicate read-only resource access. (#2680)Yong He
* Detect and deduplicate read-only resource access. * Fix tests. * Fix tests. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-24Added support for `kIROp_Select` (#2679)Sai Praveen Bangaru
2023-02-24Support dynamic dispatch a backward differentiable function. (#2678)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-24Fix differential type registration through non-differentiable type. (#2677)Yong He
* Fix differential type registration through non-differentiable type. * More fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-24More control flow simplifications. (#2673)Yong He
* 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>
2023-02-22Fixed hoisting of intermediate array & context vars (#2674)Sai Praveen Bangaru
Also added legalization for loops
2023-02-22Reverse-mode AD fixes for loops with non-trivial break region (#2671)Sai Praveen Bangaru
* 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>
2023-02-21Fix transposeCall. (#2669)Yong He
* 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>
2023-02-21Added support for simple while loops (#2667)Sai Praveen Bangaru
* Added support for simple while loops * Fix support for while loops by changing logic to grab the loop update block
2023-02-21Take into account the optimization level requested in TargetDesc (#2649)Ellie Hermaszewska
* 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
2023-02-20Miscellaneous backward autodiff fixes. (#2665)Yong He
* 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>
2023-02-20Add static for loop iteration inference. (#2659)Yong He
2023-02-17Allocate N+1 arrays instead of N to avoid out-of-bounds access when ↵Sai Praveen Bangaru
unzipping loops (#2663)
2023-02-17AD: More legacy type handling cleanup + user-defined reverse-mode fix (#2662)Sai Praveen Bangaru
* 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>
2023-02-17AD: Remove the original loop condition upon inversion (#2661)Sai Praveen Bangaru
* 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
2023-02-17Fixed crash when lowering IR for no_diff struct member. (#2658)Yong He
* Fixed crash when lowering IR for no_diff struct member. * Improve `setInsertBeforeOrdinaryInst` and `setInsertAfterOrdinaryInst`. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-17Cleaned up legacy differential type handling + type casting bugfixes (#2660)Sai Praveen Bangaru
2023-02-17Proper reverse-mode loop handling with splitting + inversion steps (#2656)Sai Praveen Bangaru
* 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)`
2023-02-16Remove `SharedIRBuilder`. (#2657)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-16Overhaul global inst deduplication and cpp/cuda backend. (#2654)Yong He
* Overhaul global inst deduplication and cpp/cuda backend. * Update IR documentation. --------- Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-16Design doc on IR deduplication and best practices when working with IRYong He
2023-02-15Treat user defined backward derivative function as non differentiable. (#2650)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>
2023-02-15Upgrade to GLSLANG 12.0.0 binaries (#2652)jsmall-nvidia
* #include an absolute path didn't work - because paths were taken to always be relative. * Upgrade GLSLANG binaries to 12.0.0
2023-02-15Upgrade GLSLANG 12.0.0 (#2651)jsmall-nvidia
* #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.
2023-02-14Preliminary Shader Execution Reordering Doc (#2648)jsmall-nvidia
* #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.
2023-02-14Preliminary debugBreak support (#2647)jsmall-nvidia
* #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
2023-02-13Various auto-diff bug fixes. (#2646)Yong He
Co-authored-by: Yong He <yhe@nvidia.com>