Make sure CCCL TMA is compiled and use it (very narrowly) - #2428
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test 2c99b8a |
2c99b8a to
679bdf5
Compare
679bdf5 to
c640173
Compare
|
/ok to test c640173 |
| make_tma = _get_cccl_make_tma_fn() | ||
| if (make_tma != NULL | ||
| and device_type == _kDLCUDA | ||
| and box_dim[0] == box_dim[rank - 1] |
There was a problem hiding this comment.
This is so restrictive, that I am not sure it still makes sense. But the specific rules also feel too complex to bother with.
(Right now, this path seems useless to me, the only reason to use it and keep it is to exercise it a bit in the hope that it'll be the only path eventually.)
|
In my conda setup, compiling `tensor_map` created linking issues and it seems like the reason this didn't fail here might be that it is missing when it shouldn't be. Adding the `cccl` headers breaks CI the same way, but moving things to `_tensor_map_cccl.pxd` and soft-linking it should then unbreak things again. This now uses CCCL in an *extremely* limited fashion because CCCL has some bugs/issues around validation. (Even if fixed, we still need to support all dtypes in DLPack, though.)
c640173 to
0d6e970
Compare
leofang
left a comment
There was a problem hiding this comment.
Catching up. I think the problem is that the TMA support was vibe-coded in rush to a large extent, and that we never had a chance to sit down and sort out the build-time dependency issue. The ideal situation should be that CCCL is used as a submodule just like what we do in CuPy. If we were to do it, we probably can absorb the fix from upstream quickly, and avoid dynamic linking to cudart (which has its own class of problems, hence we have been avoiding this pretty much everywhere)?
The core issues here is that:
This should be ready for review, two notes though:
try/exceptstyle, so I removed that. Of course thetry/exceptstyle could be used also just try on current CCCL knowing that it is wrong and things will fail most of the time.