Skip to content
Open
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
72742bd
Start from `main` branch, checkout all the fortran code (and only that).
Sep 3, 2025
cedc7cf
Delete tests that requires deferred allocation which we don't have.
Sep 3, 2025
cdd490c
Accommodate https://github.com/spcl/dace/pull/2109
Sep 4, 2025
80fbc35
`continue`, not `pass`
Sep 11, 2025
bf47282
fix for first failing test
Sep 12, 2025
793afb0
improvement on array input/output adding
Sep 12, 2025
c04d9e7
Disable renaming of variables for certain tests (and let some tests p…
Sep 12, 2025
6e0f83c
After removing the declaration, the whole list may become empty.
Sep 10, 2025
a2fb0bc
"Reparse" the AST to avoid lingering internal references to removed o…
Sep 10, 2025
9dc4672
Reinstate one tests unavailable in f2dace/dev.
Sep 12, 2025
abc074b
`use_explicit_cf` does not exist in f2dace/dev branch.
Sep 12, 2025
bdea1ab
Delete all new tests that fail.
Sep 12, 2025
086c431
Bandaid a spot of mishandled type-string.
Sep 12, 2025
bfc5678
Resolve the intrinsic type strings by borrowing helpers from ./ast_de…
Sep 12, 2025
def6c9e
fixed test
Sep 12, 2025
4fe2db3
Delete all new tests that fail.
Sep 12, 2025
7d1a990
Bandaid a spot of mishandled type-string.
Sep 12, 2025
654b727
Resolve the intrinsic type strings by borrowing helpers from ./ast_de…
Sep 12, 2025
e849865
fixed test
Sep 12, 2025
82845dc
Remove icon and ecrad specific files.
Sep 12, 2025
341bacd
Formatting fixes by `pre-commit`
Sep 12, 2025
4d81233
Update the copyright of all tiched files.
Sep 13, 2025
72c86c7
local change accept
Sep 14, 2025
21b05ef
make test program valid again
Sep 14, 2025
f841298
Merge branch 'f2dace-windmill' of https://github.com/spcl/dace into f…
Sep 14, 2025
c541615
fix for cloudsc
Sep 15, 2025
b253ad0
Remove simplifie's verbosity across the board
Sep 15, 2025
46bc426
make pre-commit happy
Sep 15, 2025
bcbc02c
Remove debug prints and debug saves.
Sep 15, 2025
6e5e91e
Renable tests in main.
Sep 15, 2025
0a320e7
Enable/disable tests for intrinsic test files.
Sep 15, 2025
063b810
Another enable/disable test to match pytest markers.
Sep 15, 2025
1fbfb8b
Remove type dumper.
Sep 15, 2025
75e4750
Comment update.
Sep 15, 2025
1d34b0c
Remove ecrad specific code.
Sep 15, 2025
440ce14
Merge branch 'main' into f2dace-windmill
Sep 16, 2025
36cdb3d
All the test programs are marked "skipped" (all the test programs are…
Sep 16, 2025
4a65b52
Remove commented out simplify.
Sep 16, 2025
a2edcb3
Remove more commented out ops.
Sep 16, 2025
8a6f752
Remove debug print (commented out already)
Sep 16, 2025
a7cbaf6
Remove commented out loop.
Sep 16, 2025
0e64842
Remove debug prints (commented out)
Sep 16, 2025
59efefb
Remove dead branches.
Sep 16, 2025
07d2b35
Remove more deadcode.
Sep 16, 2025
c71830f
More deadcode + (debug print => error)
Sep 16, 2025
e5ae5e9
Remove more deadcode and commented out code.
Sep 17, 2025
b49527d
Rename the function parameter.
Sep 17, 2025
a78e466
Apply commit suggestion.
Sep 17, 2025
5322bbb
pre-commit fix
Sep 17, 2025
5023237
Remove more of endless debug prints.
Sep 17, 2025
ce608f6
remove some more dead code
Sep 17, 2025
afc23c6
unknown unknown
Sep 17, 2025
a5c4770
Break out a couple of units out of ast_desugaring.py
Sep 18, 2025
63d3f1e
Break off another unit.
Sep 18, 2025
f1759f4
Fix test.
Sep 18, 2025
0e5f11b
Add documentation, comply with the code-style guideline etc.
Sep 18, 2025
e31eba4
break off the optimizations
Sep 18, 2025
72d19ed
add AI-slop documentation to most of the parts.
Sep 18, 2025
203bf5a
Finalize the decomposition.
Sep 19, 2025
42cb8c6
Merge branch 'main' into f2dace-windmill
Sep 24, 2025
6cb1dcd
add main branch to test file
Sep 24, 2025
e9a3c52
Refactor ast_desugaring_test
Sep 24, 2025
192a55d
Ruff formatting + pre-commit + add __main__ to tests
Sep 24, 2025
2580654
Add two tests to __main__ list
Sep 24, 2025
d5d151d
GC commented out print
Sep 24, 2025
4757ffd
two tests to __main__
Sep 24, 2025
f6f19ec
move view test
Sep 24, 2025
cf2b121
Move `parse_and_improve` to helper file
Sep 24, 2025
2c24410
Add __main__
Sep 24, 2025
0bf3b4a
Add more AI-docstrings
Sep 24, 2025
cfa606d
Resolve copyright comment
Sep 24, 2025
3de93a4
Don't import things one-by-one in fortran_parser
Sep 24, 2025
add2d46
Make pre-commit happy again
Sep 24, 2025
f906d65
Remove the redundant `.compile()` calls to SDFGs in test to avoid dou…
Sep 25, 2025
4397936
Add if __name__
Sep 25, 2025
177dd69
remove wspace
Sep 25, 2025
0d72c8f
enable simplify
Sep 25, 2025
41ee552
Remove some print('uh oh') type code
Sep 25, 2025
94d44d7
Remove serialization and deserialization related code.
Sep 26, 2025
b597a29
Scrub the readme
Sep 26, 2025
b4455a7
Remove app-specific comments and unused code. Clarify the band-aid co…
Sep 26, 2025
1350ba6
Have AI to write elaborate docstrings.
Sep 26, 2025
362d423
Rename the tests and add a bit of documentation about their intent
Sep 26, 2025
819f0e9
Fix bad names
Sep 26, 2025
b06f389
adressing comments
Sep 28, 2025
2f29e38
adressing comments
Sep 28, 2025
fd59cf0
adressing comments
Sep 28, 2025
9efd66f
Remove some commented out code
Sep 29, 2025
60a36f2
Make pre-commit happy again
Sep 29, 2025
c95817e
Exclusive conditionals.
Sep 29, 2025
ed0170c
Convert the `print()` calls into `logging.()` calls (or remove)
Sep 29, 2025
c3fa1ef
Deduplicate `_val_2_lit` logic.
Sep 29, 2025
0192dfc
Remove global_test (for being no-op with much of it commented out) an…
Sep 29, 2025
67e7c45
Add inline comment for builtin
Sep 29, 2025
160a06d
Remove more commented out code.
Sep 29, 2025
76b4be1
Convert asserts to value error in intrinsic.py
Sep 29, 2025
44b6b63
Merge branch 'main' into f2dace-windmill
ThrudPrimrose Oct 14, 2025
3c65e4e
Merge remote-tracking branch 'origin/main' into f2dace-windmill
Oct 20, 2025
54cde00
Merge branch 'main' into f2dace-windmill
pratyai Oct 27, 2025
253d165
Extend type inference to explicitly support boolean operations
mcopik Oct 27, 2025
3a4b2f8
Allow renaming variables and function uniquely optionally.
Nov 10, 2025
c001d49
test currently still failing to reproduce the length 1 array bad cond…
Nov 11, 2025
9f36d92
Merge branch 'f2dace-windmill' of https://github.com/spcl/dace into f…
Nov 11, 2025
879cbc8
Should include type traits.
Jul 23, 2025
e26b1f7
Merge branch 'main' into f2dace-windmill
Dec 9, 2025
bb7a07e
c_int and c_double support help
ThrudPrimrose Dec 10, 2025
6951c0d
Merge branch 'f2dace-windmill' of github.com:spcl/dace into f2dace-wi…
ThrudPrimrose Dec 10, 2025
f66b024
Refactor intrinsics into its own module
mcopik Jan 19, 2026
a414283
Adjust intrinsics API and remove old APIs
mcopik Jan 19, 2026
4ebe934
Missing docstrings
mcopik Jan 19, 2026
7dece8c
Remove old code
mcopik Jan 19, 2026
ecc5439
Minor adjustments in logging
mcopik Jan 19, 2026
059c5f9
Fix incorrect typing hints
mcopik Jan 19, 2026
8ad0593
Make SDFG transformations for intrinsics to be stateless
mcopik Jan 19, 2026
e2cea27
Adapt Fortran intrinsic EPSILON to argument type
mcopik Jan 19, 2026
c975d77
Merge branch 'main' into f2dace-windmill
pratyai Jan 20, 2026
f6bc4a5
Merge remote-tracking branch 'origin/main' into f2dace-windmill
pratyai Jan 22, 2026
4bdd101
Merge remote-tracking branch 'origin/main' into f2dace-windmill
Jan 29, 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
1,356 changes: 1,191 additions & 165 deletions dace/frontend/fortran/ast_components.py

Large diffs are not rendered by default.

4,089 changes: 4,089 additions & 0 deletions dace/frontend/fortran/ast_desugaring.py

Large diffs are not rendered by default.

756 changes: 677 additions & 79 deletions dace/frontend/fortran/ast_internal_classes.py

Large diffs are not rendered by default.

4,133 changes: 3,673 additions & 460 deletions dace/frontend/fortran/ast_transforms.py
Copy link
Collaborator

Choose a reason for hiding this comment

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

Like desugaring, this is a file that should be a folder. It's lengthy and can be divided into topics. Easier to do this now than later!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Large diffs are not rendered by default.

741 changes: 686 additions & 55 deletions dace/frontend/fortran/ast_utils.py

Large diffs are not rendered by default.

60 changes: 60 additions & 0 deletions dace/frontend/fortran/config_propagation_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2019-2025 ETH Zurich and the DaCe authors. All rights reserved.
import json
import sys
from pathlib import Path
from typing import List, Any, Dict, Optional, Generator, Iterable, Tuple

from dace.frontend.fortran.ast_desugaring import ConstTypeInjection, ConstInstanceInjection, ConstInjection, SPEC


def serialize(x: ConstInjection) -> str:
assert isinstance(x, (ConstTypeInjection, ConstInstanceInjection))
d: Dict[str, Any] = {
'type': type(x).__name__,
'scope': '.'.join(x.scope_spec) if x.scope_spec else None,
'root': '.'.join(x.type_spec if isinstance(x, ConstTypeInjection) else x.root_spec),
'component': '.'.join(x.component_spec),
'value': x.value
}
return json.dumps(d)


def deserialize(s: str) -> ConstInjection:
d = json.loads(s)
assert d['type'] in {'ConstTypeInjection', 'ConstInstanceInjection'}
scope = tuple(d['scope'].split('.')) if d['scope'] else None
root = tuple(d['root'].split('.'))
component = tuple(d['component'].split('.')) if d['component'] else tuple()
value = d['value']
return ConstTypeInjection(scope, root, component, value) \
if d['type'] == 'ConstTypeInjection' \
else ConstInstanceInjection(scope, root, component, value)


def find_all_config_injection_files(root: Path) -> Generator[Path, None, None]:
if root.is_file():
yield root
else:
for f in root.rglob('*.ti'):
yield f


def find_all_config_injections(ti_files: Iterable[Path]) -> Generator[ConstInjection, None, None]:
inj_map: Dict[Tuple[str, str], ConstInjection] = {}
for f in ti_files:
for l in f.read_text().strip().splitlines():
if not l.strip():
continue
x = deserialize(l.strip())
if len(x.component_spec) > 1:
print(f"{x}/{x.component_spec} must have just one-level for now; moving on...", file=sys.stderr)
continue
root = '.'.join(x.type_spec if isinstance(x, ConstTypeInjection) else x.root_spec)
comp = '.'.join(x.component_spec)
key = (root, comp)
if key in inj_map:
assert inj_map[key].value == x.value, \
f"Inconsistent values in constant injections: {x} vs. {inj_map[key]}"
else:
inj_map[key] = x
yield x
3,607 changes: 3,040 additions & 567 deletions dace/frontend/fortran/fortran_parser.py

Large diffs are not rendered by default.

Loading