Here is my (potentially naive) understanding of how we may implement bind() and device_type (probably in a follow-up email) in GCC. These are primary parts of the project that I am interested in. I would be open to exploring the cache directive as well though would like to start with a limited scope and get feedback on how long just the first two could potentially take.
The bind() clause, as part of OpenACC’s “routine directive” section in the spec defines a way to specify the name to use when calling a procedure from an accelerator device. This can be done in two ways; with an identifier, such as device_function, or a string, such as “device_function”. If it is an identifier, it will be treated like any other function in your source code. If a string is passed, the compiler will not enforce any naming rules or mangling, and the accelerator (or other device) will specially target that exact name. Implementation: The bind clause will need to be parsed, represented in GIMPLE IR, mapped to an external device (lowered), generate bindings for the external device (nvptx/gcc), then tested and validated using existing GCC test infrastructure and adding some of my own. These are the relevant files for each part: gcc/c-family/c-pragma.cc c/c-parser.cc cp/parser.cc gcc/gimple.h gcc/gimple.def gcc/omp-low.cc gcc/config/nvptx/ and/or gcc/config/gcn/ gcc/testsuite/c-c++-common/goacc/ Potential Runtime integration: libgomp/oacc/… (did not do much research on this yet so I may not know what I’m talking about) I also have significant research prepared for implementing the device_type clause as well, but would like feedback on whether or not I’m in the correct ballpark with bind() first. I have further implementation details prepared but definitely need more time to get comfortable with the codebase and intricacies. I believe I could spend an entire summer in just these two but I don’t have the clearest vision for this project to make an accurate judgement. Be harsh! Thank you, Carter.