[QST] How to stop unroll in cute.copy in cute dsl?
What is your question? cute.copy will always fully unroll its inner load/store. But in some case, the unrolling in cute.copy will case serious register spill. So I wonder how to stop unroll in cute.copy elegantly, instead of just manullay copy?
What is your question? cute.copy will always fully unroll its inner load/store. But in some case, the unrolling in cute.copy will case serious register spill. So I wonder how to stop unroll in cute.copy elegantly, instead of just manullay copy?
@brandon-yujie-sun
Thanks for the question. cute.copy today fully unrolls when the inner loop size is static. There are probably several options:
- to avoid serious register spill, you'd probably tweak the atom size for the copy
- you can also probably try out cute.copy_atom_call with your customized for loop with cutlass.range to control the unrolling behavior yourself.
Please let us know how this would help and we would discuss and plan more examples in future release for 2.
cc @vickiw973
Thanks a lot! The cute.copy_atom_call seems what I want and I will try it.
@brandon-yujie-sun it might be useful to add unrolling control to API for copy & gemm?
Yes, that's a good idea. Will follow up on that.