This MAX_LANE_SIZE was a hack from the days when we used a single
instance of the server and had some GPU state handle it. Now that we
have everything templated this really shouldn't be used. This patch
removes its use and replaces it with template arguments.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I'm not sure about this being on the methods. Why not the class itself? We have a bad time if different places manage to disagree on the value
libc/utils/gpu/loader/Loader.h | ||
---|---|---|
114 | Static assert that it's 32 or 64 here, or maybe go so far as a valid-for-target call? | |
libc/utils/gpu/loader/amdgpu/Loader.cpp | ||
425 | handle_error if it isn't 32 or 64 please. Maybe a switch on size with handle_error in the default? |
Address comments. The template is on the handle_server call because it's a variant class we use std::visit on.
libc/utils/gpu/loader/Loader.h | ||
---|---|---|
112 | This will never pass |
libc/utils/gpu/server/rpc_server.cpp | ||
---|---|---|
96 | Was a functional change intended here? |
libc/utils/gpu/server/rpc_server.cpp | ||
---|---|---|
96 | This isn't technically a functional change, since this callback automatically uses the current thread mask I could put this part in here instead which serves the purpose of getting rid of the invocation of the lane size. |
This will never pass