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-check-expr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-check-expr.cpp') diff --git a/source/slang/slang-check-expr.cpp b/source/slang/slang-check-expr.cpp index 336682bf4..1ffc45fbd 100644 --- a/source/slang/slang-check-expr.cpp +++ b/source/slang/slang-check-expr.cpp @@ -2136,9 +2136,9 @@ namespace Slang type->paramTypes.add(derivType); } } - + // Last parameter is the initial derivative of the original return type - type->paramTypes.add(originalType->resultType); + type->paramTypes.add(getDifferentialType(m_astBuilder, originalType->resultType, SourceLoc())); return type; } -- cgit v1.2.3