Skip to content
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

Codegen should be able to generate one DPU binary per upmem.launch #4

Closed
6 tasks done
Tracked by #2
oowekyala opened this issue Jun 18, 2024 · 0 comments
Closed
6 tasks done
Tracked by #2
Assignees

Comments

@oowekyala
Copy link
Collaborator

oowekyala commented Jun 18, 2024

Currently the UPMEM->DPU CPP pass generates one C file with just one main function.
We need to generate one binary for each upmem.launch though. The thread count is launch-specific, needs to be passed as compiler option when compiling DPU binary.

Draft design:

  • Outline all DPU kernels into single module
  • Have upmem->DPU CPP generate one function for each upmem.launch
  • Have a main that conditionally compiles exactly one of those functions
  • The conditional compilation variables along with the thread count are written in a header comment on line 1.
  • This comment is parsed by a script that then invokes the DPU compiler and generates as many binaries as there are upmem.launch blocks.
  • The binary path for each launch must be passed as argument to upmemrt_dpu_alloc.
@oowekyala oowekyala mentioned this issue Jun 18, 2024
18 tasks
@oowekyala oowekyala self-assigned this Jun 18, 2024
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

No branches or pull requests

1 participant