Skip to content

Commit a4d7b8e

Browse files
committed
validate parallel type
1 parent c99f003 commit a4d7b8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

csrc/tensor_view.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,10 @@ TensorView* TensorView::swizzle(
769769
}
770770

771771
TensorView* TensorView::swizzle1d(int64_t x, ParallelType pt) {
772+
NVF_CHECK(
773+
deviceParallelTypes().contains(pt),
774+
"Swizzle1D only supports device parallel types, given: ",
775+
pt);
772776
domain()->swizzle1d(x, pt);
773777
return this;
774778
}

0 commit comments

Comments
 (0)