Unverified Commit 440df0aa by Zhi Committed by GitHub

[Relay][vm] Small bug fix for DataTypeObject (#3604)

* small bug fix for DataTypeObject

* retrigger ci
parent d6dcd6c5
......@@ -85,7 +85,7 @@ class DatatypeObject(Object):
return self.fields[idx]
def __len__(self):
return self.num_fields
return len(self.fields)
def __iter__(self):
return iter(self.fields)
......
......@@ -213,6 +213,9 @@ def test_list_constructor():
mod["main"] = f
result = veval(mod)
assert len(result) == 2
assert len(result[1]) == 2
obj = vmobj_to_list(result)
tvm.testing.assert_allclose(obj, np.array([3,2,1]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment