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

feat[next]: Add support for more datatypes #1786

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

SF-N
Copy link
Contributor

@SF-N SF-N commented Dec 30, 2024

This builds on PR#1708 without the float16 and bfloat16 changes.

Add support for int8, uin8, int16, uint16, uint32 and uint64.

Move builtin definitions from src/gt4py/next/iterator/ir.py to src/gt4py/next/iterator/builtins.py.

Use ascending integer values in ScalarKind-Enum and modify tests respectively.

Set start: int = 1 in tests/next_tests/integration_tests/cases.py to not start initialization from zero as this has the same value as zero-initialized memory and modify tests respectively.

@SF-N SF-N requested a review from tehrengruber December 30, 2024 15:53
@@ -192,13 +192,13 @@ class UniqueInitializer(DataInitializer):
data containers.
"""

start: int = 0
start: int = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have added a test that relies on start being zero, which is a mistake. Let me know if you see a problem.

Copy link
Contributor

@tehrengruber tehrengruber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double check the changes I pushed.

src/gt4py/next/iterator/builtins.py Outdated Show resolved Hide resolved
@@ -318,7 +318,9 @@ def testee(a: int32, b: int32, c: cases.IField) -> cases.IField:
# not inlined
return tmp2 * tmp2 * c

cases.verify_with_default_data(cartesian_case, testee, ref=lambda a, b, c: a * b * a * b * c)
cases.verify_with_default_data(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test erroneously passed before since verify_with_default_data used 0 for a which made the entire expression 0.

@SF-N
Copy link
Contributor Author

SF-N commented Jan 17, 2025

Please double check the changes I pushed.

I checked them and they look good to me. test_arithmetic_and_logical_builtins is failing for (not_, [[True, False]], [False, True]) and I am not sure why.

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

Successfully merging this pull request may close these issues.

3 participants