Skip to content

Commit

Permalink
[Docker] Upgrade oneflow to v0.8.0 (#15862)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lhutton1 authored Oct 4, 2023
1 parent b8abff9 commit 7a1f7d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker/install/ubuntu_install_oneflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 8 additions & 4 deletions python/tvm/relay/frontend/oneflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))


Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 7a1f7d0

Please sign in to comment.