Skip to content

Commit

Permalink
Add winograd into annotation pass
Browse files Browse the repository at this point in the history
  • Loading branch information
elvin-n committed Jul 22, 2022
1 parent 68127af commit cfd30d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/relay/transforms/annotate_texture_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ class StorageInfo : private transform::DeviceAwareExprVisitor {
attrs->kernel_layout == "OIHW4o")) {
supports_texture_storage = true;
}
} else if (auto attrs = call->attrs.as<Conv2DWinogradAttrs>()) {
if ((attrs->data_layout == "NCHW4c" || attrs->data_layout == "NHWC4c") &&
(attrs->kernel_layout == "OIHW4o" || attrs->kernel_layout == "HWIO4o")) {
supports_texture_storage = true;
}
} else if (auto attrs = call->attrs.as<GlobalPool2DAttrs>()) {
if (attrs->layout == "NCHW4c") {
supports_texture_storage = true;
Expand Down

0 comments on commit cfd30d5

Please sign in to comment.