Repository navigation
[compiler] Make cuda/hip/vulkan target cl options consistent - #17710
Conversation
dcfc0a6 to
100d9d8
Compare
6c3d7a7 to
f8912b0
Compare
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
f8912b0 to
f8253b4
Compare
ScottTodd
left a comment
There was a problem hiding this comment.
Can you add a table to the PR description with the before --> after for each flag? That would both help with review and for future users looking through commit history to see what changed.
| llvm::cl::desc("Dump ptx to the debug stream.")); | ||
|
|
||
| binder.opt<std::string>("iree-hal-cuda-llvm-target-arch", clTargetChip, | ||
| binder.opt<std::string>("iree-cuda-target", clTarget, |
There was a problem hiding this comment.
I'm not sure about the namespace here.
Some options to consider:
iree-hal-cuda-namespace underhalsince these relate to the hal part of the pipelineiree-plugin-cuda-namespace underpluginsince this code is in a pluginiree-cuda-floating near the top of the namespace hierarchy
There was a problem hiding this comment.
I treat these namespaces as mostly a way to avoid command-line option collison; not to indicate strong nested logical/directory structure. Reason being that from a developer's perspective, it does not matter much to know that, oh, cuda/hip/vulkan is a plugin under hal, which is more implementation details.
Also given these APIs are top tier we are supporting, it's okay to directly use -iree-<api> as a prefix imo--it's shorter and easier to memorize. The iree-hal category can leave for things common to all hal impls (if we ever have).
we sort of doing this structure on codegen side, where iree-codegen prefix is for stuff common to all codegen backends, while iree-spirv, iree-llvmgpu, etc. for backend specific ones. wdyt?
There was a problem hiding this comment.
Using --iree-<api>-* instead of --iree-hal-<api>-* sounds good to me. @benvanik might have an opinion too.
| llvm::cl::desc("Dump ptx to the debug stream.")); | ||
|
|
||
| binder.opt<std::string>("iree-hal-cuda-llvm-target-arch", clTargetChip, | ||
| binder.opt<std::string>("iree-cuda-target", clTarget, |
There was a problem hiding this comment.
This is a breaking change.
We could keep the old flags as deprecated to give some time to transition. If the functionality is the same, just forward the old values into the new flags.
There was a problem hiding this comment.
I'm leaning towards to just force the break immedidately. It's gonna happen anyway and people typically don't change until stuff break. :)
There was a problem hiding this comment.
Let's be careful with the sequencing and not just break compatibility because we can.
@benvanik has some breaking changes pending too, so we should at least try to batch those together as part of a stable release.
There was a problem hiding this comment.
SG. I'm happy to wait until the next train of breaking changes is ready. :D
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
0f5dcb3 to
1bc153c
Compare
Signed-off-by: Lei Zhang <[email protected]>
Signed-off-by: Lei Zhang <[email protected]>
Yup. Done. |
Signed-off-by: Lei Zhang <[email protected]>
14dee09 to
a1ba687
Compare
ScottTodd
left a comment
There was a problem hiding this comment.
Okay, changes LGTM. May want at least one other reviewer to look over the flag name changes and approve too.
Timing-wise, we should figure out some process for batching breaking changes together. We've already had one land since the last stable update, so there might not be that much practical value in waiting.
raikonenfnu
left a comment
There was a problem hiding this comment.
LGTM! Thanks for the clean up :)
This commits changes the command line options for specifying
targets for CUDA/HIP/Vulkan to
--iree-<api>-targetand thecorresponding feature option to
--iree-<api>-target-features.This makes more sense given we are not using a triple or
a chip anymore--it's more flexible as to accept codenames and
product names. This also makes the options consistent.
This is a breaking change. Here are the main list of options:
--iree-hal-cuda-llvm-target-arch--iree-cuda-target--iree-hal-cuda-llvm-target-feature--iree-cuda-target-features--iree-rocm-target-chip--iree-hip-target--iree-rocm-target-features--iree-hip-target-features--iree-vulkan-target-triple--iree-vulkan-target--iree-hal-cuda-*--iree-cuda-*--iree-rocm-*--iree-hip-*Progress towards #16341
ci-extra: test_nvidia_gpu,test_nvidia_a100,test_amd_mi250,build_test_all_macos_arm64,build_and_test_android