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

Generate built-in dispatch.ll from C source #2816

Open
nurmukhametov opened this issue Mar 27, 2024 · 1 comment
Open

Generate built-in dispatch.ll from C source #2816

nurmukhametov opened this issue Mar 27, 2024 · 1 comment

Comments

@nurmukhametov
Copy link
Collaborator

It looks like there is no real reason to have dispatch*.ll files manually generated from dispatch.c source. It can be generated during ISPC build process.

Due to missing tests for dispatch logic, it depends on #2815

@dbabokin
Copy link
Collaborator

Not a call to action, but just to add broader context here. The logic of dispatch module exists in ISPC compiler in 3 different incarnations:

  • dispatch.ll - library code that is injected into user binary when auto-dispatch feature is used (i.e. multiple targets are specified in the command line)
  • the code checking the ISA of the host where ISPC binary is executed (to determine the target when --target=host is specified) - it's part of the compiler itself. lGetSystemISA() function in ispc.cpp.
  • the code of check_isa.cpp - which is standalone utility reporting the ISA of the machine where it is executed on.

I thought about unifying all there 3 places, but they have different requirements and probably unification introduces more problems than brings value.

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

2 participants