Repository navigation
Keep normalizations of GPUTensorMaps from synchronizing - #615
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
7b2a16a to
25b87d9
Compare
|
GPU fail isn't related and should be fixed by the next Mooncake release |
25b87d9 to
eb05b83
Compare
eb05b83 to
2c0ef29
Compare
Jutho
left a comment
There was a problem hiding this comment.
I don't quite like abbreviations that consist of just removing a single letter :-), such as in _nrm2. I am fine keeping it like this for now (even though the argument order is opposite to (cu)BLAS.nrm2 so there is no benefit in giving it the same name), but I think the whole PR is probably a temporary solution that will need to be reconsidered if we have proper device scalar support, right? Maybe at a TODO about that.
|
I think the |
2c0ef29 to
3e2e2bb
Compare
Co-authored-by: Lander Burgelman <39218680+leburgel@users.noreply.github.com>
6b8b7cb to
7da21c2
Compare
|
I'm going to merge so this can go out in the next TK release and we can update when the |
Right now we're doing a roundtrip when we normalize a tensor backed by a GPU array, because
normreturns a host scalar which is then copied back to the GPU for the actual normalization. This is synchronizing also. I added some generic fallbacks as well as a hook for the 2-norm since some benchmarking showed thatcuBLAS.nrm2is ~6x as fast as my fallback and avoids overflows. Once a new AMDGPU is out we can supportrocBLAS.nrm2also.