Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
901b57e
fix[cartesian]: log10 percision issue
romanc May 8, 2026
1abd6c7
Expose more math functions in `dace/math.h`
romanc May 11, 2026
1eec3df
update dace (fix fmod arguments)
romanc May 11, 2026
da74589
Merge branch 'main' into romanc/fix-log10-precision
romanc May 11, 2026
9fbba0a
Merge remote-tracking branch 'GridTools/main' into romanc/fix-log10-p…
FlorianDeconinck May 11, 2026
7ba05d5
Merge branch 'main' into romanc/fix-log10-precision
romanc May 19, 2026
c186e61
Add dace:gpu_IJK backend
FlorianDeconinck May 22, 2026
3da968c
Fix GPU compiler flags when not `-O0`
FlorianDeconinck May 22, 2026
f19583f
Merge branch 'feature/dace_gpu_IJK_backend' into romanc/fix-log10-pre…
FlorianDeconinck May 22, 2026
08bb317
fixes for running GFDL_1M with orch:dace:cpu:KJI
romanc May 28, 2026
58e449e
Merge remote-tracking branch 'origin/main' into romanc/fix-log10-prec…
romanc May 28, 2026
08100b8
fix pyproject.toml & uv.lock files after merge with main
romanc May 28, 2026
d19bf89
restore cartesian/next versions for dace
romanc May 29, 2026
eca45a3
Fix failing GPU tests (dace:gpu_IJK fallout)
romanc Jun 1, 2026
210fcbd
unrelated dace update: just fixing a typo
romanc Jun 1, 2026
795e377
CFlags for device code is a list (as expected later by GT stencil com…
FlorianDeconinck Jun 5, 2026
fa099e6
Merge remote-tracking branch 'origin/main' into romanc/fix-log10-prec…
romanc Jun 9, 2026
d6449bb
dace update: unrelated typehint fix
romanc Jun 9, 2026
cdca87a
dace update: fixup for unrelated typehint change
romanc Jun 9, 2026
f0b62e5
Merge remote-tracking branch 'GridTools/main' into romanc/fix-log10-p…
FlorianDeconinck Jun 10, 2026
65299a7
Merge remote-tracking branch 'GridTools/main' into romanc/fix-log10-p…
FlorianDeconinck Jun 11, 2026
cf04c49
minor: remove unused imports from test
romanc Jun 15, 2026
ddf3cb3
dace update: unique names for loop regions
romanc Jun 17, 2026
4d6e27b
feat: descriptive map/loop names
romanc Jun 22, 2026
d568ac7
dace update: consider read-after-write in stree input_memlets
romanc Jun 22, 2026
98e63aa
perf: avoid `x + 0` and `0 + x` computations in regions
romanc Jun 23, 2026
331c7bb
dace update: gpu transformation fix
romanc Jun 23, 2026
bc3fcf2
fixup: `x + 0`: node.offset is an integer
romanc Jun 23, 2026
371f036
Merge remote-tracking branch 'origin/main' into romanc/fix-log10-prec…
romanc Jul 8, 2026
9739808
Merge remote-tracking branch 'origin/main' into romanc/fix-log10-prec…
romanc Jul 10, 2026
edf64ce
Merge remote-tracking branch 'origin/main' into romanc/fix-log10-prec…
romanc Jul 10, 2026
5b42d0d
udpate dace (cartesian & next) to latest/correct version
romanc Jul 13, 2026
df2c5d4
see if this works to get us a special dace-cartesian version of dace
romanc Jul 23, 2026
92c74e9
Revert "see if this works to get us a special dace-cartesian version …
romanc Jul 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,13 @@
CodeGenTestSettings: Final[dict[str, dict[str, list[str]]]] = {
"internal": {"extras": ["jax"], "markers": ["not requires_dace"]}
}
CodeGenDaceTestSettings = CodeGenTestSettings | {
"dace": {"extras": [], "markers": ["requires_dace"]},
# Use dace-cartesian group to select the appropriate dace version
CodeGenCartesianTestSettings = CodeGenTestSettings | {
"dace": {"extras": [], "groups": ["dace-cartesian"], "markers": ["requires_dace"]},
}
# Install dace-next group to select the appropriate dace version
CodeGenNextTestSettings = CodeGenTestSettings | {
"dace": {"extras": [], "groups": ["dace-next"], "markers": ["requires_dace"]},
}


Expand Down Expand Up @@ -167,7 +172,7 @@ def test_cartesian(
) -> None:
"""Run selected 'gt4py.cartesian' tests."""

codegen_settings = CodeGenDaceTestSettings[codegen]
codegen_settings = CodeGenCartesianTestSettings[codegen]
device_settings = DeviceTestSettings[device]
extras = [
"standard",
Expand Down Expand Up @@ -250,7 +255,7 @@ def test_next(
) -> None:
"""Run selected 'gt4py.next' tests."""

codegen_settings = CodeGenDaceTestSettings[codegen]
codegen_settings = CodeGenNextTestSettings[codegen]
device_settings = DeviceTestSettings[device]
extras = [
"standard",
Expand Down Expand Up @@ -385,7 +390,7 @@ def test_next_dace_determinism(
"""Run selected 'gt4py.next' DaCe tests twice and verify codegen
is byte-identical between the two runs."""

codegen_settings = CodeGenDaceTestSettings["dace"]
codegen_settings = CodeGenNextTestSettings["dace"]
device_settings = DeviceTestSettings[device]
extras = [
"standard",
Expand Down
16 changes: 14 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ requires = ['cython>=3.0.0', 'setuptools>=77.0.3', 'versioningit>=3.1.1', 'wheel
# -- Dependency groups --
[dependency-groups]
build = ['cython>=3.0.0', 'pip>=22.1.1', 'setuptools>=77.0.3', 'wheel>=0.33.6']
dace-cartesian = [
'dace>=1.0.2' # refined in [tool.uv.sources]
]
dace-next = [
'dace==43!2026.04.27' # uses custom index at 'https://github.com/GridTools/pypi'
]
dev = [
{include-group = 'build'},
{include-group = 'docs'},
Expand Down Expand Up @@ -100,7 +106,6 @@ dependencies = [
'click>=8.0.0',
'cmake>=3.22',
'cytoolz>=1.0.1',
'dace>=2.0.0a4',
'deepdiff>=8.1.0',
'devtools>=0.6',
'factory-boy>=3.3.3',
Expand Down Expand Up @@ -460,6 +465,10 @@ conflicts = [
{extra = 'jax-cuda13'},
{extra = 'rocm6'},
{extra = 'rocm7'}
],
[
{group = 'dace-cartesian'},
{group = 'dace-next'}
]
]
default-groups = ["dev"]
Expand All @@ -476,9 +485,12 @@ name = 'gridtools'
url = 'https://gridtools.github.io/pypi/'

# Add the uv source below to pull dace from the gridtools index instead of PyPI:
# dace = {index = "gridtools"}
[tool.uv.sources]
atlas4py = {index = "test.pypi"}
dace = [
{git = "https://github.com/romanc/dace", branch = "gmao-visit", group = "dace-cartesian"},
{git = "https://github.com/spcl/dace", tag = "v2.0.0-alpha4 ", group = "dace-next"}
]

# -- versioningit --
[tool.versioningit]
Expand Down
28 changes: 14 additions & 14 deletions src/gt4py/cartesian/gtc/dace/oir_to_tasklet.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,38 +226,38 @@ def visit_NativeFunction(self, node: common.NativeFunction, **_kwargs: Any) -> s
common.NativeFunction.ABS: "abs",
common.NativeFunction.MIN: "min",
common.NativeFunction.MAX: "max",
common.NativeFunction.MOD: "fmod",
common.NativeFunction.MOD: "dace.math.fmod",
common.NativeFunction.SIN: "dace.math.sin",
common.NativeFunction.COS: "dace.math.cos",
common.NativeFunction.TAN: "dace.math.tan",
common.NativeFunction.ARCSIN: "asin",
common.NativeFunction.ARCCOS: "acos",
common.NativeFunction.ARCTAN: "atan",
common.NativeFunction.ARCSIN: "dace.math.asin",
common.NativeFunction.ARCCOS: "dace.math.acos",
common.NativeFunction.ARCTAN: "dace.math.atan",
common.NativeFunction.SINH: "dace.math.sinh",
common.NativeFunction.COSH: "dace.math.cosh",
common.NativeFunction.TANH: "dace.math.tanh",
common.NativeFunction.ARCSINH: "asinh",
common.NativeFunction.ARCCOSH: "acosh",
common.NativeFunction.ARCTANH: "atanh",
common.NativeFunction.ARCSINH: "dace.math.asinh",
common.NativeFunction.ARCCOSH: "dace.math.acosh",
common.NativeFunction.ARCTANH: "dace.math.atanh",
common.NativeFunction.SQRT: "dace.math.sqrt",
common.NativeFunction.POW: "dace.math.pow",
common.NativeFunction.EXP: "dace.math.exp",
common.NativeFunction.LOG: "dace.math.log",
common.NativeFunction.LOG10: "log10",
common.NativeFunction.GAMMA: "tgamma",
common.NativeFunction.CBRT: "cbrt",
common.NativeFunction.LOG10: "dace.math.log10",
common.NativeFunction.GAMMA: "dace.math.tgamma",
common.NativeFunction.CBRT: "dace.math.cbrt",
common.NativeFunction.ISFINITE: "isfinite",
common.NativeFunction.ISINF: "isinf",
common.NativeFunction.ISNAN: "isnan",
common.NativeFunction.FLOOR: "dace.math.ifloor",
common.NativeFunction.CEIL: "ceil",
common.NativeFunction.TRUNC: "trunc",
common.NativeFunction.CEIL: "dace.math.ceil",
common.NativeFunction.TRUNC: "dace.math.trunc",
common.NativeFunction.INT32: "dace.int32",
common.NativeFunction.INT64: "dace.int64",
common.NativeFunction.FLOAT32: "dace.float32",
common.NativeFunction.FLOAT64: "dace.float64",
common.NativeFunction.ERF: "erf",
common.NativeFunction.ERFC: "erfc",
common.NativeFunction.ERF: "dace.math.erf",
common.NativeFunction.ERFC: "dace.math.erfc",
common.NativeFunction.ROUND: "nearbyint",
common.NativeFunction.ROUND_AWAY_FROM_ZERO: "round",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,22 @@ def test_integer_power_of_integer() -> None:
tasklet_code = visitor.visit_NativeFuncCall(pow_call, ctx=fake_context, is_target=False)

assert "ipow" not in tasklet_code


@pytest.mark.parametrize(
"arg",
[
oir.Literal(value="2", dtype=common.DataType.FLOAT32),
oir.Literal(value="2", dtype=common.DataType.FLOAT64),
],
)
def test_log10_respects_floating_point_precision(arg: oir.Literal) -> None:
log10_call = oir.NativeFuncCall(func=common.NativeFunction.LOG10, args=[arg])

visitor = oir_to_tasklet.OIRToTasklet()
fake_context = oir_to_tasklet.Context(
code="asdf", targets=set(), inputs={}, outputs={}, tree=None, scope=None
)
tasklet_code = visitor.visit_NativeFuncCall(log10_call, ctx=fake_context, is_target=False)

assert "dace.math.log10" in tasklet_code
Loading
Loading