This is an automated email from the ASF dual-hosted git repository.

leandron pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 7a1f7d0b5a [Docker] Upgrade oneflow to v0.8.0 (#15862)
7a1f7d0b5a is described below

commit 7a1f7d0b5a7052f13d6ef8b5cefc159db1142069
Author: Luke Hutton <luke.hut...@arm.com>
AuthorDate: Wed Oct 4 10:35:56 2023 +0100

    [Docker] Upgrade oneflow to v0.8.0 (#15862)
    
    The PR #15819 installed oneflow from PyPi in an attempt to unblock CI
    failing on the gpu docker image build. However, it seems to be a
    placeholder package. This PR upgrades the version of oneflow to v0.8.0
    in a second attempt to unblock CI.
    
    Change-Id: I92bcc6aee79dfcbeba7c13cf0b6d91104be16f5c
---
 docker/install/ubuntu_install_oneflow.sh |  2 +-
 python/tvm/relay/frontend/oneflow.py     | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/docker/install/ubuntu_install_oneflow.sh 
b/docker/install/ubuntu_install_oneflow.sh
index 04fccd5b9c..6c0e90e4f2 100755
--- a/docker/install/ubuntu_install_oneflow.sh
+++ b/docker/install/ubuntu_install_oneflow.sh
@@ -22,4 +22,4 @@ set -o pipefail
 
 pip3 install flowvision==0.1.0
 
-python3 -m pip install oneflow==0.7.0
+python3 -m pip install oneflow==0.8.0
diff --git a/python/tvm/relay/frontend/oneflow.py 
b/python/tvm/relay/frontend/oneflow.py
index ddfa043caf..72f3b20ecb 100644
--- a/python/tvm/relay/frontend/oneflow.py
+++ b/python/tvm/relay/frontend/oneflow.py
@@ -742,7 +742,6 @@ class ExpandDim(OneFlowOpConverter):
 
     @classmethod
     def _impl_v1(cls, inputs, attrs, params):
-
         return _op.expand_dims(inputs[0], axis=attrs.get("axis", 0))
 
 
@@ -1434,8 +1433,10 @@ def get_convert_map():
         # defs/nn
         "conv2d": Conv2d.get_converter(),
         "deconv2d": ConvTranspose2d.get_converter(),
-        "maxpool_2d": MaxPool2d.get_converter(),
-        "avgpool_2d": AveragePool2d.get_converter(),
+        "max_pool_2d": MaxPool2d.get_converter(),
+        "avg_pool_2d": AveragePool2d.get_converter(),
+        "maxpool_2d": MaxPool2d.get_converter(),  # Maintained for oneflow 
versions <= "0.7.0"
+        "avgpool_2d": AveragePool2d.get_converter(),  # Maintained for oneflow 
versions <= "0.7.0"
         "adaptive_avg_pool2d": AdaptiveAvgPool2d.get_converter(),
         "adaptive_max_pool2d": AdaptiveMaxPool2d.get_converter(),
         "dropout": Dropout.get_converter(),
@@ -1909,7 +1910,10 @@ def from_oneflow(graph, model_dir_path):
             size_attr = size_str[0].replace("size=", "")
             if size_attr[-2] == ",":
                 size_attr = size_attr.replace(",", "")
-            data_size = tuple(map(int, size_attr[1:-1].split(", ")))
+            if size_attr == "()":
+                data_size = ()
+            else:
+                data_size = tuple(map(int, size_attr[1:-1].split(", ")))
             node_name = attrs[1]
             shape[node_name] = data_size
             dtype[node_name] = "float32"

Reply via email to