You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "nwy2010 (via GitHub)" <gi...@apache.org> on 2023/03/31 06:46:41 UTC
[GitHub] [tvm] nwy2010 opened a new issue, #14442: [Bug] "FLOW_2_NP_DTYPE" undefined
nwy2010 opened a new issue, #14442:
URL: https://github.com/apache/tvm/issues/14442
I find some bug!
in tvm/python/tvm/relay/frontend/oneflow.py
1、“FLOW_2_NP_DTYPE“ is undefined
`def get_node_info(node):
"""
Get basic information about nodes: shape, data_type
"""
# list->tuple
shape = tuple(node.input_conf.blob_conf.shape.dim)
# get data type
dtype = node.input_conf.blob_conf.data_type
if dtype in list(FLOW_2_NP_DTYPE.keys()):
data_type = FLOW_2_NP_DTYPE[dtype]
else:
raise IndexError("Please check the data type of your node: %s" % node.name)
return shape, data_type`
2、"scales" undefined
`class Upsample(OneFlowOpConverter):
"""A helper class for upsample op converters"""
name = ""
@classmethod
def _impl_v1(cls, inputs, attrs, params):
data = inputs[0]
input_shape = infer_shape(data)
dims = len(input_shape)
width_scale = attrs.get("width_scale", 1.0)
height_scale = attrs.get("height_scale", 1.0)
align_corners = attrs.get("align_corners", False)
if "nearest" in cls.name:
method = "nearest_neighbor"
elif "trilinear" in cls.name:
method = "trilinear"
elif "bilinear" in cls.name:
method = "bilinear"
# in 3d case, we use the purely static op
if dims == 5:
if isinstance(scales, _expr.Expr):
scale_h = _op.take(scales, _op.const(3))
scale_w = _op.take(scales, _op.const(4))
scale_d = _op.take(scales, _op.const(1))
else:
assert len(scales) == 5
scale_h = scales[-2]
scale_w = scales[-1]
scale_d = scales[-3]`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi commented on issue #14442: [Bug] "FLOW_2_NP_DTYPE" undefined
Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi commented on issue #14442:
URL: https://github.com/apache/tvm/issues/14442#issuecomment-1492658290
You are welcome to send a PR to fix them. We don't have active contributors to the oneflow frontend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi closed issue #14442: [Bug] "FLOW_2_NP_DTYPE" undefined
Posted by "masahi (via GitHub)" <gi...@apache.org>.
masahi closed issue #14442: [Bug] "FLOW_2_NP_DTYPE" undefined
URL: https://github.com/apache/tvm/issues/14442
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org