[BUGFIX]: Force unroll a loop that doesn't have compilation constant (#441)

loop times is dangerous.

Signed-off-by: Peter Han <fujun.han@iluvatar.ai>
This commit is contained in:
Fujun Han 2022-04-25 04:28:32 +08:00 committed by GitHub
parent 167ac54c65
commit 4c0d6e1eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,7 @@ CUTLASS_DEVICE void dump_fragment(Fragment const& frag, int N = 0, int M = 0,
for (int tid = 0; tid < N; ++tid) {
if (tid == thread_id) {
printf("TB%d W%d T%d: ", block_id, tid / 32, tid & 31);
CUTLASS_PRAGMA_UNROLL
CUTLASS_PRAGMA_NO_UNROLL
for (int i = 0; i < M; i += S) {
printf("%.0f ", float(typename Fragment::value_type(frag[i])));
}