This is an archive of the discontinued LLVM Phabricator instance.

[flang] Add support for -acc for compatibility with nvfortran.
AcceptedPublic

Authored by ygribov on Jan 20 2022, 2:49 AM.

Diff Detail

Event Timeline

ygribov created this revision.Jan 20 2022, 2:49 AM
Herald added a project: Restricted Project. · View Herald Transcript
ygribov requested review of this revision.Jan 20 2022, 2:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 20 2022, 2:49 AM

I realize that the wrapper may be removed in few months so let me know if this is irrelevant.

This change will make the flang script support nvfortran a bit better, but that's at the cost of some extra complexity. And this script has never been meant to be particularly scalable or extensible :) @ygribov , do you envisage more such options? Or is this a one off?

flang/tools/f18/flang
182

-acc is not accepted by Flang, so it's in a yet different category. Also, the current comment is out-of-date: -fopenmp and -fopenacc _are_ in the same category as -I and -J. Would you mind updating it accordingly?

261–265

This new case makes sense, but could you make it clear that this is specifically for nvfortan? Updating the comment would be fine.

264

@ygribov , do you envisage more such options? Or is this a one off?

I expect it to be one off because other relevant flags seem to already be supported. nvfortran's OpenACC is better than gfortran's one so it's generally preferred for OpenACC testing.

ygribov updated this revision to Diff 402895.Jan 25 2022, 6:50 AM

Resolve review comments.

ygribov marked 3 inline comments as done.Jan 25 2022, 6:51 AM
awarzynski accepted this revision.Jan 25 2022, 11:04 AM

LGTM, thanks for addressing my comments!

This revision is now accepted and ready to land.Jan 25 2022, 11:04 AM