diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2020-09-16 17:45:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-16 17:45:07 -0700 |
| commit | 3e2cb34bf112722368c296130b1424de267d2b3c (patch) | |
| tree | 17babf78043854903a7ea300d33db5445e948572 /premake5.lua | |
| parent | 8dd0d26466b7b84b0575031bff2ced8b3b1a1bac (diff) | |
Fix some issues around dim3 for CUDA (#1544)
The logic we use to compute `SV_DispatchThreadID` and friends for CUDA makes use of the `gridDim` and `blockDim` built-in variables in CUDA. These variables have type `dim3` which is similar to `uint3` but is considered a distinct type for some reason.
The logic for computing the `SV`s currently pretends that `gridDim` and `blockDim` are `uint3`s, and this means that the code they emit doesn't always compile cleanly (although it does in our existing test cases...).
This change adds a few overloads that work on `dim3` to the CUDA prelude and that seem to make the code we emit work again.
Note: This change should be seen as a somewhat hacky quick fix rather than a real resolution to the underlying issue. It is probably better if we emit code that replaces uses of `gridDim` with `uint3(gridDim.x, gridDim.y, gridDim.z)` instead, to ensure that we get the typing correct, even if the result looks less idiomatic.
Diffstat (limited to 'premake5.lua')
0 files changed, 0 insertions, 0 deletions
