Skip to content

[SYCL][CUDA] WIP/RFC: cuda symbol table #1670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

hiaselhans
Copy link
Contributor

as pointed out in #1588 cuda fatbins are bundled without the entries table.
In order to have concurrent backends working we will definitely need that.

i was following the advices of @kbobrovs. There is a nvptx *.table and *.sym file now with proper symbols and binary filenames.
I'm asking for a little guidance on how to proceed:

next step would be to construct a llvm-foreach wrapping this:

Action *finalizeNVPTXDependences(Action *Input, const llvm::Triple &TT) {

My approach would be to create a SYCLCompileOffload::ConstructJob in clang/lib/Driver/ToolChains/Clang.cpp which runs the backend and assemble phase returning fatbin filenames.

Is this the right approach or should i be less invasive? As clang-offload-wrapper is handling a single fatbin it would also handle a fatbin batch, right?

Thanks for the help. I think I'm yet too far away..

@hiaselhans hiaselhans changed the title [SYCL][CUDA] RFC: cuda symbol table [SYCL][CUDA] WIP/RFC: cuda symbol table May 11, 2020
@Ruyk
Copy link
Contributor

Ruyk commented May 12, 2020

FYI @Naghasan

@hiaselhans hiaselhans marked this pull request as draft May 12, 2020 10:51
@Naghasan
Copy link
Contributor

My approach would be to create a SYCLCompileOffload::ConstructJob in clang/lib/Driver/ToolChains/Clang.cpp which runs the backend and assemble phase returning fatbin filenames.

I'm not sure what you mean by this. You want to create a new Tool to handle this ? Then to which ToolChain would it belong to ?

runs the backend and assemble phase a tool doesn't run "phases". There is a binding operation (you can see the result of this operation with -ccc-print-bindings) which then triggers a ConstructJob to build from a file type A to a file type B. It is also this operation that decides the file names.

@hiaselhans
Copy link
Contributor Author

well, to be honest i'm still trying to find out about the difference of tools / jobs...

but in a way we'd need something like this:
list of bc files -> (tool/job) -> list of fatbins
to feed that to clang-offload-wrapper batch mode.
Then offloadwrapper could enclose the entries names.

I'm not 100% about this but maybe that would also allow to include the gpu_arch in specialization constants?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda CUDA back-end
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants