Repository navigation
Conversation
|
Does #459 help as well? |
|
Haven't tried yet but in theory they should be complimentary, I would imagine? I'll do some benchmarking :) |
|
In principle this is something we do have quite a bit of support for in TensorOperations, and just never got around pushing this all the way through (mostly because I got scared/tired of Zygote). I have some code laying around specifically for some more efficient SU stuff, let me try if it is actually worth it. The main thing is that with the growing buffers, which are also used in MPSKit, only the first couple iterations have to allocate and the remainder is fine, even with different truncations |
|
I kind of suspected that might be the case, if this serves as a forcing function elsewhere it's fine with me to close it. Anything I can do to help? |
Many such cases!!! |
If I get the SU through, maybe you could have a look at the CTMRG? Let me get to the office first, and see how much of this I really have just laying around |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
@lkdvos any updates on this? |
|
The SU stuff just got merged! |
|
Let me see if that obviates the SU part of this with some benchmarks :D |
|
Also sorry, which PR was it that just got merged? |
|
Also looking at this a bit more, I might have made the GPU support for symmetries slower because of the multiple kernel launches, but at least it's not allocating anymore 🙃 More seriously though, the buffer is mostly what I was talking about, having that in CTMRG would be amazing |
I originally tried this to help on AMD, which doesn't have a warm pool for memory allocations, making any alloc/dealloc extremely expensive. Happily it turns out to help by ~10% on CUDA too.
The basic idea is to store buffers for reuse where possible in CTMRG and SU, allowing us to avoid allocating and deallocating repeatedly. We can reuse buffers through a CTMRG iteration and then release them after (when truncation would change their size anyway) saving us a lot of wasted work in the GPU GC. This should be enough to get ROCm test times under the 2 hour limit I set on BuildKite.