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

Support None type #328

Open
take-cheeze opened this issue Jun 4, 2019 · 0 comments
Open

Support None type #328

take-cheeze opened this issue Jun 4, 2019 · 0 comments

Comments

@take-cheeze
Copy link
Contributor

take-cheeze commented Jun 4, 2019

Currently they are treated as False in ch2o:

# TODO(hamaji): Revisit to check if this decision is OK.

How to check:

diff --git a/ch2o/tests/syntax/Cmp.py b/ch2o/tests/syntax/Cmp.py
index fa8913b..e1ab3fc 100644
--- a/ch2o/tests/syntax/Cmp.py
+++ b/ch2o/tests/syntax/Cmp.py
@@ -67,6 +67,7 @@ if __name__ == '__main__':
         for x, y in [(None, None),
                      (42, None),
                      (True, None),
+                     (False, None),
                      (True, False),
                      (True, True),
                      (False, False),
@@ -75,4 +76,3 @@ if __name__ == '__main__':
                      (np.array(42), np.array(42))]:
             ch2o.generate_testcase(cls(), [x, y],
                                    subname='%s_%s_%s' % (x, name, y))
-

$ python3 scripts/ch2ocheck.py ch2o/tests/syntax/Cmp.py

Thoughts to implement:

  • Rename current Null kind of ChxVMVar to Undefined
  • Mark a special opaque kind with name None in ONNX representation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant