Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] "FLOW_2_NP_DTYPE" undefined #14442

Closed
nwy2010 opened this issue Mar 31, 2023 · 1 comment
Closed

[Bug] "FLOW_2_NP_DTYPE" undefined #14442

nwy2010 opened this issue Mar 31, 2023 · 1 comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@nwy2010
Copy link

nwy2010 commented Mar 31, 2023

I find some bug!
in tvm/python/tvm/relay/frontend/oneflow.py
1、“FLOW_2_NP_DTYPE“ is undefined
shape = tuple(node.input_conf.blob_conf.shape.dim)
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):
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]
@nwy2010 nwy2010 added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Mar 31, 2023
@masahi
Copy link
Member

masahi commented Mar 31, 2023

You are welcome to send a PR to fix them. We don't have active contributors to the oneflow frontend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

2 participants