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

101 tutorials #62

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

101 tutorials #62

wants to merge 18 commits into from

Conversation

FlorianDeconinck
Copy link
Collaborator

Adding 101 tutorials for the stack & the common workflows

  • NDSL
    • Pure gt4py
    • NDSL
  • Fortran porting (serialization)

Copy link
Collaborator Author

@FlorianDeconinck FlorianDeconinck left a comment

Choose a reason for hiding this comment

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

This is looking good.

Overall I'd like to rename the folder "gt4py" -> "NDSL" and "serialbox" -> "Porting Fortan".

I also think we need to be careful about exposing a lot of the gt4py entrails that are covered by NDSL API. While we, the SMT team, require to know about it, the end users shouldn't. As well let's rename OO_gt4py to NDSL_basics because it factually is how we use GT4Py in NDSL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

  • Describe GT4Py as a stencil system to differentiate with the full program optimizer later
  • Remove gt4py.storage since we are already using ndsl.FloatField lets remove that distinction and use Quantity directly. Allocation are common scare for scientists, lets have a single point of entry
  • Add the main stencil restriction: write with offset in IJ, demonstrate a failure
  • Add compile time switch (__INLINED)

Copy link
Contributor

Choose a reason for hiding this comment

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

Quick question: where do I add the compile time switch (__INLINED)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Look at this unit test in gt4py

__INLINED is a conditional switch, where the condition has to be given in the externals. It turns the conditional into a compile time conditional (e.g. the externals can't change at runtime) and does branch culling so the conditional is removed from the runtime

Copy link
Contributor

Choose a reason for hiding this comment

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

I addressed most of the bullet points. I'm still not sure what (__INLINED) is supposed to help with.

tutorial/gt4py/02_oo_gt4py.ipynb Outdated Show resolved Hide resolved
tutorial/gt4py/boilerplate.py Outdated Show resolved Hide resolved
tutorial/serialbox/01.ipynb Outdated Show resolved Hide resolved
tutorial/serialbox/02.ipynb Outdated Show resolved Hide resolved
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.

2 participants