File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
torch/csrc/jit/codegen/cuda Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -440,8 +440,20 @@ void HaloInfo::build(TensorDomain* td) {
440
440
} else {
441
441
setHaloWidth (merge->out (), 0 );
442
442
}
443
- } else if (expr-> getExprType (). value () == ExprType:: Swizzle2D) {
443
+ } else if (auto swizzle = dynamic_cast < Swizzle2D*>(expr) ) {
444
444
// Assume no halo on swizzled domain for now.
445
+ TORCH_INTERNAL_ASSERT (
446
+ getExtent (swizzle->inX ()) == nullptr ,
447
+ " Halo is not supported with swizzle. Halo-extended ID: " ,
448
+ swizzle->inX ()->toString (),
449
+ " used in " ,
450
+ swizzle->toString ());
451
+ TORCH_INTERNAL_ASSERT (
452
+ getExtent (swizzle->inY ()) == nullptr ,
453
+ " Halo is not supported with swizzle. Halo-extended ID: " ,
454
+ swizzle->inY ()->toString (),
455
+ " used in " ,
456
+ swizzle->toString ());
445
457
for (auto id : ir_utils::filterByType<IterDomain>(expr->outputs ())) {
446
458
setHaloWidth (id, 0 );
447
459
}
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ void ReplayTransformations::handle(Swizzle2D* swizzle_2d) {
137
137
auto id_in_y = swizzle_2d->inY ();
138
138
139
139
// Make sure we have a corresponding entry in our map pointing to the ID we're
140
- // going to replay the split on
140
+ // going to replay the swizzle on
141
141
auto it_x = id_map_.find (id_in_x);
142
142
auto it_y = id_map_.find (id_in_y);
143
143
@@ -162,7 +162,7 @@ void ReplayTransformations::handle(Swizzle2D* swizzle_2d) {
162
162
auto outs = std::make_pair (mapped_x, mapped_y);
163
163
164
164
if (replay_swizzle_) {
165
- // Replay the split onto mapped
165
+ // Replay the swizzle onto mapped
166
166
outs = IterDomain::swizzle (swizzle_2d->swizzleType (), mapped_x, mapped_y);
167
167
168
168
// Remove mapped from the leaf IDs
You can’t perform that action at this time.
0 commit comments