Skip to content

WIP: Make Enzyme aware of Fortran arrays#2963

Draft
joewallwork wants to merge 6 commits into
mainfrom
2822_fortran-descriptor-awareness
Draft

WIP: Make Enzyme aware of Fortran arrays#2963
joewallwork wants to merge 6 commits into
mainfrom
2822_fortran-descriptor-awareness

Conversation

@joewallwork

Copy link
Copy Markdown
Collaborator

Closes #2822

@joewallwork joewallwork self-assigned this Jul 20, 2026

// float _FortranASum(ptr array, ptr file, i32 lineno, i32 dim, ptr mask)
// TODO: Account for other versions. Can we do startsWith?
if (funcName == "_FortranASumReal4") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this could be useful for type analysis since you can use it as a piece of information that ptr array is using Real

@vchuravy

Copy link
Copy Markdown
Member

I was looking through flang and the runtime sadly doesnt have a nice descriptor, but it is all in C++ headers.

I think there is an argument here that instead of Enzyme LLVM we should see if we can use Enzyme MLIR to handle the flang runtime.

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.

Enzyme is not aware of Fortran descriptors

2 participants