shader-slang / slang

Making it easier to work with shaders
http://shader-slang.com
MIT License
2.16k stars 186 forks source link

AD Cleanup: Remove array & pair-specific logic for `dadd` and `dzero` methods. #4410

Open saipraveenb25 opened 4 months ago

saipraveenb25 commented 4 months ago

This should be a quick cleanup. We already have dadd and dzero defined in diff.meta.slang for DifferentialPairType and ArrayType. There should not be any need to synthesize them again in slang-ir-autodiff-transpose.cpp (emitDZeroOfDiffInstType, emitDAddOfDiffInstType)

swoods-nv commented 3 months ago

Not sure this is currently actionable; Yong & Sai to discuss offline