Enable CUDA Fortran support to bbc with -fcuda
Details
Diff Detail
Event Timeline
flang/tools/bbc/bbc.cpp | ||
---|---|---|
422 | I don't think you need the change to define _CUDA. The preprocessor entry for this should be enabled solely by enabling the language feature. (parsing.cpp does it). Since there is no language versioning, I don't think you need to do it the same as _OPENACC. This is required for _OPENACC because the tool sets the desired language level. And this macro must be defined as part of OpenACC spec. |
Currently CUDA Fortran is not supported in FIR, there is no correct FIR to check at this moment. So I will add a test later once the support is there.
I think I am going to add a test in Driver for testing the switch bbc -fcuda. Please stay tuned. Thanks
Modified the test so that it's not tied to the value of _CUDA, which is not the intention of this test.
This test is to test that -fcuda option works for bbc.
Thanks for adding a test, LGTM!
Perhaps this flag should be added when FIR is updated to support CUDA?
I don't think you need the change to define _CUDA. The preprocessor entry for this should be enabled solely by enabling the language feature. (parsing.cpp does it).
Since there is no language versioning, I don't think you need to do it the same as _OPENACC. This is required for _OPENACC because the tool sets the desired language level. And this macro must be defined as part of OpenACC spec.