Skip to content

Commit

Permalink
[lang] Fixed useless serial shader to blit ExternalTensorShapeAlongAx…
Browse files Browse the repository at this point in the history
…isStmt on Metal (#7562)

Issue: #

### Brief Summary

It's already fixed in other SPIR-V powered archs tho. Could we come up
with a better way than this sequence of arch checks?
  • Loading branch information
PENGUINLIONG authored Mar 15, 2023
1 parent 9f99f1a commit 4280678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions taichi/transforms/offload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Offloader {
offloaded->end_value = val->val.val_int32();
} else {
if ((arch == Arch::opengl || arch == Arch::vulkan ||
arch == Arch::gles) &&
arch == Arch::gles || arch == Arch::metal) &&
demotable_axis_load(s->end)) {
// TODO: We need to update codegen for each backend gradually so
// let's limit it to opengl backend for now.
Expand Down Expand Up @@ -387,7 +387,7 @@ class IdentifyValuesUsedInOtherOffloads : public BasicStmtVisitor {
(stmt->is<ArgLoadStmt>() && stmt->as<ArgLoadStmt>()->is_ptr))
return;
if ((config_.arch == Arch::opengl || config_.arch == Arch::vulkan ||
config_.arch == Arch::gles) &&
config_.arch == Arch::gles || config_.arch == Arch::metal) &&
demotable_axis_load(stmt))
return;
// Not yet allocated
Expand Down

0 comments on commit 4280678

Please sign in to comment.