Skip to content

WIP: feature: TracerBundle#235

Closed
romanc wants to merge 17 commits into
NOAA-GFDL:nasa/milestone2from
romanc:romanc/tracer-bundle
Closed

WIP: feature: TracerBundle#235
romanc wants to merge 17 commits into
NOAA-GFDL:nasa/milestone2from
romanc:romanc/tracer-bundle

Conversation

@romanc
Copy link
Copy Markdown
Collaborator

@romanc romanc commented Sep 19, 2025

Description

⚠️ Work in progress ⚠️

Initial attempt to write a DSL-like, orchestrateable version of a TracerBundle.

How has this been tested?

Please describe the tests that you ran to verify your changes. Please also note
any relevant details for your test configuration (e.g. compiler, OS). Include
enough information so someone can reproduce your tests.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

@romanc romanc force-pushed the romanc/tracer-bundle branch 3 times, most recently from ea06af4 to 4e4dd6e Compare September 22, 2025 15:19
Comment thread ndsl/dsl/stencil.py
kwargs[name] = arg.data
except AttributeError:
pass
def _convert_NDSL_concepts_to_storage(args: tuple, kwargs: dict) -> tuple[tuple, dict]:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Good catch.

Alternative is to have a ABC class and/or implement a __to_gt4py_storage__ functions that would be tested, like DaCe or numpy does for it's interface systems

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, this is really just to make it work. I could see something like a GT4PyStorageConvertible base class or so that would expose a function convert the concept to something that GT4Py understands. I'll come back to that once we have a working prototype (including orchestration).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can also be a "refactor later" tasks, it's in the back enough to be "safe"

Comment thread ndsl/quantity/quantity.py Outdated
be derived from a Storage if given as the data argument, otherwise the
storage attribute is disabled and will raise an exception. Will raise
a TypeError if this is given with a gt4py storage type as data
allow_mismatch_float_precision: ???
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By default allocating any floating point fields is tested against the system-wide Float. This attribute allows user to flag that their usage of np.float32/64 is needed (defensive programming)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good to know, I'll add this in the final cleanup (once things are working)

@romanc romanc mentioned this pull request Sep 22, 2025
7 tasks
@romanc romanc force-pushed the romanc/tracer-bundle branch 3 times, most recently from 3a12ffb to 40e1740 Compare September 26, 2025 07:55
@romanc romanc mentioned this pull request Oct 14, 2025
7 tasks
@romanc romanc force-pushed the romanc/tracer-bundle branch 2 times, most recently from 5b2acb5 to 25476da Compare October 15, 2025 07:44
@romanc romanc force-pushed the romanc/tracer-bundle branch from d4d86e3 to de04821 Compare October 22, 2025 12:50
@romanc romanc deleted the branch NOAA-GFDL:nasa/milestone2 October 27, 2025 08:11
@romanc romanc closed this Oct 27, 2025
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