From 468bb7ecf65c000c308adae511bf65a1ca4cc412 Mon Sep 17 00:00:00 2001 From: Sai Praveen Bangaru <31557731+saipraveenb25@users.noreply.github.com> Date: Thu, 8 Dec 2022 11:50:55 -0500 Subject: More type support for reverse-mode (#2551) * Add vector arithmetic test. Make gradient accumulation work for any IRLoad * Added support for general vector types, and split transposition into transpose & materialize to allow emitting the fully accumulated gradient for complex types. * Several bug fixes + finished up support for vector & struct types + removed prop pass * minor fixes (int/uint casts) * Removed IRConstruct * Added some type casts to prevent warnings * minor fix for unused variable --- source/slang/slang-ir-autodiff-rev.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-ir-autodiff-rev.cpp') diff --git a/source/slang/slang-ir-autodiff-rev.cpp b/source/slang/slang-ir-autodiff-rev.cpp index 8ec8f581c..34a08ee93 100644 --- a/source/slang/slang-ir-autodiff-rev.cpp +++ b/source/slang/slang-ir-autodiff-rev.cpp @@ -511,7 +511,10 @@ struct BackwardDiffTranscriber this->makeParameterBlock(builder, as(fwdDiffFunc)); // This steps adds a decoration to instructions that are computing the differential. - diffPropagationPass->propagateDiffInstDecoration(builder, fwdDiffFunc); + // TODO: This is disabled for now because fwd-mode already adds differential decorations + // wherever need. We need to run this pass only for user-writted forward derivativecode. + // + // diffPropagationPass->propagateDiffInstDecoration(builder, fwdDiffFunc); // Copy primal insts to the first block of the unzipped function, copy diff insts to the // second block of the unzipped function. -- cgit v1.2.3