<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/source/slang/diff.meta.slang, branch master</title>
<subtitle>Making it easier to work with shaders</subtitle>
<id>https://git.yummers.dev/slang.git/atom?h=master</id>
<link rel='self' href='https://git.yummers.dev/slang.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/'/>
<updated>2025-07-09T16:25:29+00:00</updated>
<entry>
<title>no_diff diagnostics improvement (#7655)</title>
<updated>2025-07-09T16:25:29+00:00</updated>
<author>
<name>kaizhangNV</name>
<email>149626564+kaizhangNV@users.noreply.github.com</email>
</author>
<published>2025-07-09T16:25:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a670bafc121c20168624f70a388dbe8556402c7f'/>
<id>urn:sha1:a670bafc121c20168624f70a388dbe8556402c7f</id>
<content type='text'>
close #6286.

This PR is to improve the diagnostics for no_diff usage.

In a differentiable function, any calls to a non-diff function with constant arguments should not require no_diff attribute.
This PR adds this extra check at `checkAutoDiffUsages` where it checks the differentiability on IR.

In a differentiable method, we will force to use `[NoDiffThis]` attribute if there is access to non-differentiable `This` type. Once this access is detected we will report a warning to bring users attention that this access won't generate any derivative, they have to use `[NoDiffThis]` to suppress that warning.
This PR adds this check at type checking stage, because it's the easiest way to find out all the `This` accesses.</content>
</entry>
<entry>
<title>Make copysign function differentiable (#7585)</title>
<updated>2025-07-04T06:53:02+00:00</updated>
<author>
<name>Copilot</name>
<email>198982749+Copilot@users.noreply.github.com</email>
</author>
<published>2025-07-04T06:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b282c88d9743fc9bb60ef27cfa5d9cf58cccd60b'/>
<id>urn:sha1:b282c88d9743fc9bb60ef27cfa5d9cf58cccd60b</id>
<content type='text'>
* Initial plan

* Implement copysign forward and backward derivatives

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix copysign test format to use expected.txt file

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Add wgsl support to copysign and fix y==0 derivative case

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Add wgsl support to copysign helper functions

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

* Fix copysign derivative to return 0 when either x or y is 0

Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;

---------

Co-authored-by: copilot-swe-agent[bot] &lt;198982749+Copilot@users.noreply.github.com&gt;
Co-authored-by: csyonghe &lt;2652293+csyonghe@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Make interface types non c-style in Slang2026. (#7260)</title>
<updated>2025-06-04T20:05:58+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-06-04T20:05:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=812e478989e27983b8dea7ab11964de751654ba2'/>
<id>urn:sha1:812e478989e27983b8dea7ab11964de751654ba2</id>
<content type='text'>
* Make interface types non c-style.

* Make Optional&lt;T&gt; work with autodiff and existential types.

* Fix.

* patch behind slang 2026.

* Fix warnings.

* cleanup.

* Fix tests.

* Fix.

* Fix com interface lowering.

* Add comment to test.

* regenerate command line reference

* Add test for passing `none` to autodiff function.

* Fix recording of `getDynamicObjectRTTIBytes`.

* Fix nested Optional types.

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>Add inverse hyperbolic derivatives (#7173)</title>
<updated>2025-05-21T05:48:19+00:00</updated>
<author>
<name>Darren Wihandi</name>
<email>65404740+fairywreath@users.noreply.github.com</email>
</author>
<published>2025-05-21T05:48:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=c4b6ef0bd6a7b7de131786c661c7e3423e318d7e'/>
<id>urn:sha1:c4b6ef0bd6a7b7de131786c661c7e3423e318d7e</id>
<content type='text'>
* Add inverse hyperbolic derivatives

* Add test</content>
</entry>
<entry>
<title>Improve performance when compiling small shaders. (#6396)</title>
<updated>2025-02-23T18:31:05+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2025-02-23T18:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=51ad07d1fbffd41c758eba172aa77ebba3204924'/>
<id>urn:sha1:51ad07d1fbffd41c758eba172aa77ebba3204924</id>
<content type='text'>
Improve performance when compiling small shaders.

Avoid copying witness table entries that are not getting used during linking.
Avoid copying auto-diff related decorations and derivative functions during linking, if the user modules doesn't use autodiff.
Cache operator overload resolution results on global session, so each new Session doesn't need to repetitively run through overload resolution from scratch.</content>
</entry>
<entry>
<title>Fix gradient behavior for min() and max() functions at boundaries. When input values are equal, the gradient is split evenly between both inputs. (#6411)</title>
<updated>2025-02-21T07:31:05+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2025-02-21T07:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ca592d2791047be4df3cac44c18af99f003bd085'/>
<id>urn:sha1:ca592d2791047be4df3cac44c18af99f003bd085</id>
<content type='text'>
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Fix issue with `clamp`'s derivatives at the boundary. (#6403)</title>
<updated>2025-02-19T21:05:10+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2025-02-19T21:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=a02379208f8906272d3fd773d4b5cfe8eec3be3b'/>
<id>urn:sha1:a02379208f8906272d3fd773d4b5cfe8eec3be3b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[Docs] Auto-diff documentation overhaul (#6202)</title>
<updated>2025-01-30T23:06:51+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2025-01-30T23:06:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ae778e3424b39cbeb1f367339f654560de416d30'/>
<id>urn:sha1:ae778e3424b39cbeb1f367339f654560de416d30</id>
<content type='text'>
* AD: Docs Update

* More documentation

* More documentation

* More docs fixes

* Cleanup documentation

* More docs polish. Add docs for the [Differentiable] attributes

* Fixup code sections

* Fixup

* Address review comments

* regenerate documentation Table of Contents

* Update docs with more playground links

---------

Co-authored-by: slangbot &lt;186143334+slangbot@users.noreply.github.com&gt;
Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>Add `IDifferentiablePtrType` support for arrays (#5576)</title>
<updated>2024-11-18T21:34:03+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2024-11-18T21:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=ec5e019fa9732b99b75b2a3ca4f2ff5a7a3d2f33'/>
<id>urn:sha1:ec5e019fa9732b99b75b2a3ca4f2ff5a7a3d2f33</id>
<content type='text'>
* Add `IDifferentiablePtrType` support for arrays

- Also fixes an issue with spirv-emit of constructors that contain references to global params

* Fix GLSL legalization for arrays of resource types</content>
</entry>
<entry>
<title>Assorted auto-diff enhancements for increased performance &amp; more streamlined auto-diff results (#5394)</title>
<updated>2024-10-28T19:47:58+00:00</updated>
<author>
<name>Sai Praveen Bangaru</name>
<email>31557731+saipraveenb25@users.noreply.github.com</email>
</author>
<published>2024-10-28T19:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b61be5e6fb7fe1c4ec8228cdf73f49f11e5a0ac9'/>
<id>urn:sha1:b61be5e6fb7fe1c4ec8228cdf73f49f11e5a0ac9</id>
<content type='text'>
* Various AD enhancements

* Fix issue with pt-loop test

* Update pt-loop.slang

* More fixes for perf. Final minimal context test now passes.

* Fix issue with loop-elimination pass not running after dce

* Try fix wgpu test by removing select operator

* Disable wgpu

* Delete out.wgsl

* Remove comments

* Update slang-ir-util.cpp

* Fix header relative paths for slang-embed

* Disbale wgpu for a few other tests

* Better way of determining which params to ignore for side-effects

* Update slang-ir-dce.cpp

* Fix issue with circular reference from previous AD pass being left behind for the next AD pass

* Update slang-ir-dce.cpp</content>
</entry>
</feed>
