<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slang.git/tools/gfx/cuda, 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-08-15T22:16:04+00:00</updated>
<entry>
<title>Update cuda context creation to support cuda 13 (#8181)</title>
<updated>2025-08-15T22:16:04+00:00</updated>
<author>
<name>jarcherNV</name>
<email>jarcher@nvidia.com</email>
</author>
<published>2025-08-15T22:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3639e71dfcb7e5284949a98d1fefddda118338be'/>
<id>urn:sha1:3639e71dfcb7e5284949a98d1fefddda118338be</id>
<content type='text'>
Update cuda context creation to support both cuda 12 and cuda 13.</content>
</entry>
<entry>
<title>Make CUDA version capabilities reach NVRTC (#7074)</title>
<updated>2025-05-12T22:50:32+00:00</updated>
<author>
<name>Theresa Foley</name>
<email>10618364+tangent-vector@users.noreply.github.com</email>
</author>
<published>2025-05-12T22:50:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b423ea55b4b00004bde1f91d95d9e5161d0ae629'/>
<id>urn:sha1:b423ea55b4b00004bde1f91d95d9e5161d0ae629</id>
<content type='text'>
Fixes #7049

The root cause of the problem in #7049 is simply that newer NVRTC versions produce a warning when asked to generate code for older CUDA SM versions, and the default that Slang was requesting compilation for was old enough to trigger that warning, and thus trip up the test case (which only looks at the first diagnostic produced by the downstream compiler).

Superficially, the fix was easy: change the test case in question (`tests/diagnostics/local-line.slang`) to request `-capability cuda_sm_8_0`, the minimum version supported by current NVRTC.

Unfortunately, the simple fix required some other fixes in order to actually work.

The capability system includes capability names of the form `cuda_sm_*_*`, but specifying such a capability had *no* impact on the CUDA SM version passed in when invoking NVRTC.
Instead, only the CUDA SM versions requested in the implementation of intrinsics in the core module were affecting the version number passed down.

This change adds logic to `slang-compiler.cpp` to take explicitly requested capabilities into account when inferring the CUDA SM version to be passed downstream.
A more complete fix would also add similar logic for all the other targets.

Unfortunately... yet again... that fix wasn't enough to make things work as expect.
Now I had the problem that requesting `-capability cuda_sm_8_0` was actually causing the NVRTC invocation to request CUDA SM version **9.0**!

The underlying problem *there* was that the `slang-capabilities.capdef` file has defined certain capability names in a way that implies atomic capabilities much higher than one would expect.
E.g., the `cuda_sm_8_0` alias was including HLSL `sm_5_0`, but then `sm_5_0` in turn included `_cuda_sm_9_0`.

The fix, for now, is to change the definitions in `slang-capabilities.capdef` to not have the counter-intuitive definitions for `cuda_sm_*_*`.

With this set of fixes, the test failure in the original bug report no longer occurs.

The work that went into this change suggests several larger-scope fixes that would be good to pursue:

* Ideally the capability definitions would have some sort of validation checking to make sure that counter-intuitive results like `cuda_sm_8_0` requesting CUDA SM 9.0 do not occur.

* The translation of capabilities over to version numbers for a downstream compiler should be expanded to cover other targets, and not just CUDA. It might be better/simpler to just pass the capabilities themselves to the downstream compiler, since it is possible that a downstream compiler could have more fine-grained enable/disable options than a simple version number.

* The entire approach to computing version numbers required for downstream compilation should be cleaned up so that we don't have this duplication between the capabilities that represent those versions and separate syntactic constructs that are used to "request" those versions as part of code generation.

* We are very much at the point where we should consider dropping the current behavior where a profile name or capability like `sm_5_0`, that is specific to a single target or a subset of targets, also implies a set of comparable capabilities for other targets.</content>
</entry>
<entry>
<title>Move switch statement bodies to their own lines (#5493)</title>
<updated>2024-11-05T17:47:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-11-05T17:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=b118451e301d734e3e783b3acdf871f3f6ea851c'/>
<id>urn:sha1:b118451e301d734e3e783b3acdf871f3f6ea851c</id>
<content type='text'>
* Move switch statement bodies to their own lines

* format

---------

Co-authored-by: Yong He &lt;yonghe@outlook.com&gt;</content>
</entry>
<entry>
<title>format</title>
<updated>2024-10-29T06:49:26+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2024-10-29T06:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21'/>
<id>urn:sha1:f65d756bff8d4c5cbc15bd0322a2ae8e6b896a21</id>
<content type='text'>
* format

* Minor test fixes

* enable checking cpp format in ci</content>
</entry>
<entry>
<title>[gfx] use CUDA driver API (#3776)</title>
<updated>2024-03-15T17:25:21+00:00</updated>
<author>
<name>skallweitNV</name>
<email>64953474+skallweitNV@users.noreply.github.com</email>
</author>
<published>2024-03-15T17:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=9ee88a43f4e67d9c714c27bf968401b6bf7524af'/>
<id>urn:sha1:9ee88a43f4e67d9c714c27bf968401b6bf7524af</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[SPIRV] Add NonSemanticDebugInfo for step-through debugging. (#3644)</title>
<updated>2024-02-29T06:57:07+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-02-29T06:57:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=73a61edda8893901acad05bb4e7d3110db5041a8'/>
<id>urn:sha1:73a61edda8893901acad05bb4e7d3110db5041a8</id>
<content type='text'>
* [SPIRV] Add NonSemanticDebugInfo for step-through debugging.

* Fix.

* Fix.</content>
</entry>
<entry>
<title>Refactor compiler option representations. (#3598)</title>
<updated>2024-02-20T20:24:00+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2024-02-20T20:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=4d20fd329956ac89408b1628a8291fea01bc9a6d'/>
<id>urn:sha1:4d20fd329956ac89408b1628a8291fea01bc9a6d</id>
<content type='text'>
* Refactor compiler option representation.

* Fix binary compatibility.

* Add a test for specifying compiler options at link time.

* Fix binary compatibility.

* Fix binary compatibility.

* Fix backward compatibility on matrix layout.

* Fix.

* Fix.

* Fix.

* Fix gfx.

* Fix gfx.

* Fix dynamic dispatch.

* Polish.</content>
</entry>
<entry>
<title>Parameter binding and gfx fixes. (#3302)</title>
<updated>2023-11-02T04:42:12+00:00</updated>
<author>
<name>Yong He</name>
<email>yonghe@outlook.com</email>
</author>
<published>2023-11-02T04:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=6aca3813c4ccc496c0f9b2db293acb546aa11d2d'/>
<id>urn:sha1:6aca3813c4ccc496c0f9b2db293acb546aa11d2d</id>
<content type='text'>
* Parameter binding and gfx fixes.

* Add diagnostics on entry point parameters.

* Fix.

---------

Co-authored-by: Yong He &lt;yhe@nvidia.com&gt;</content>
</entry>
<entry>
<title>Pointer layout support (#2930)</title>
<updated>2023-06-27T15:28:14+00:00</updated>
<author>
<name>jsmall-nvidia</name>
<email>jsmall@nvidia.com</email>
</author>
<published>2023-06-27T15:28:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=1b01ff909afa1eb6700c0dc947e679b9c3890880'/>
<id>urn:sha1:1b01ff909afa1eb6700c0dc947e679b9c3890880</id>
<content type='text'>
* WIP looking at reflection with pointers.

* Added GetPointerLayout.

* Initial test via reflection with layout of ptr type.

* WIP handles ptrs to types that have layout that hasn't been completed.

* Move tests to ptr.

* WIP try to take into account lowering correctly between AggTypeDecl and Type, but doesn't quite work.

* WIP a different path to handling recursive lowering problem with Ptr.

* Fix issues with reflection output.

* Small tidy.

* Fix for infinite recursion issue.

* Lower IRPointerTypeLayout

* Working with generics.
Has a hack to work around Layout around Ptr in IR.
The reflection around the generic - the name isn't much use, it should probably have the generic parameters, but that would require getName to do something more sophisticated.

* Fix issue around calling finishOuterGenerics to early.

* Remove feature/ptr test.

* Fix type legalization being an infinite loop with Ptr self referencing.

* Disable the pointer self reference test because produces an infintie loop on emit.

* Fixed comment based on review.

* Fix for issue with emit and pointers causing infinite recursion.</content>
</entry>
<entry>
<title>Fix most of the disabled warnings on gcc/clang (#2839)</title>
<updated>2023-04-27T04:36:59+00:00</updated>
<author>
<name>Ellie Hermaszewska</name>
<email>ellieh@nvidia.com</email>
</author>
<published>2023-04-27T04:36:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.yummers.dev/slang.git/commit/?id=3acbe8145c60f4d1e7a180b4602a94269a489df5'/>
<id>urn:sha1:3acbe8145c60f4d1e7a180b4602a94269a489df5</id>
<content type='text'>
</content>
</entry>
</feed>
