Repository navigation
[GPU] Introduce and plumb through GPUCodegenOptions. - #23290
Conversation
|
Does controlling LLVM's opt optimization level and the LLC optimization level also fall into these options or are they handled separately? |
Coming from CPU's world and the LLVM lowering path, I think we eventually will have at least two optimization flags, one is for MLIR level codegen that IREE is doing, and the other is LLVM opt level for LLVM module. E.g., #19072 (comment) This one is mainly for MLIR level that we control our optimization in IREE. |
881b34d to
88bcbc5
Compare
ae118cc to
de2615d
Compare
de2615d to
f8c6b2a
Compare
The revision mirrors the CPUCodegenOptions pattern from the LLVMCPU backend. For now, it only expose `enablePrefetch` to public because it is the only flag used in `tests/external/iree-test-suites`. Other flags can be exposed base on needs. The remaining flags are supposed to be hidden from CLI helpers, since they are either for testing purpose or experiments. It also drops `=true` from `tests/external/iree-test-suites/*` because it is redundant and we want consistency. Signed-off-by: hanhanW <[email protected]>
f8c6b2a to
0719a52
Compare
| class ROCMTargetBackend final : public TargetBackend { | ||
| public: | ||
| ROCMTargetBackend(const ROCMOptions &options) : options(options) {} | ||
| ROCMTargetBackend(const ROCMOptions &options, GPUCodegenOptions codegenOpts) |
There was a problem hiding this comment.
Is the warning above is actionable?
There was a problem hiding this comment.
Yes, I think so. We should move these classes into an anonymous namespace. There are several classes need the fix (e.g., AMDGPUTargetDevice, HIPTargetDevice, and other backends, etc.), so I'll send a follow-up to fix them.
The revision mirrors the CPUCodegenOptions pattern from the LLVMCPU backend. For now, it only expose `enablePrefetch` to public because it is the only flag used in `tests/external/iree-test-suites`. Other flags can be exposed base on needs. The remaining flags are supposed to be hidden from CLI helpers, since they are either for testing purpose or experiments. It also drops `=true` from `tests/external/iree-test-suites/*` because it is redundant and we want consistency. Signed-off-by: hanhanW <[email protected]>
The revision mirrors the CPUCodegenOptions pattern from the LLVMCPU backend. For now, it only expose `enablePrefetch` to public because it is the only flag used in `tests/external/iree-test-suites`. Other flags can be exposed base on needs. The remaining flags are supposed to be hidden from CLI helpers, since they are either for testing purpose or experiments. It also drops `=true` from `tests/external/iree-test-suites/*` because it is redundant and we want consistency. Signed-off-by: hanhanW <[email protected]>
The revision mirrors the CPUCodegenOptions pattern from the LLVMCPU backend. For now, it only expose
enablePrefetchto public because it is the only flag used intests/external/iree-test-suites. Other flags can be exposed base on needs. The remaining flags are supposed to be hidden from CLI helpers, since they are either for testing purpose or experiments.It also drops
=truefromtests/external/iree-test-suites/*because it is redundant and we want consistency.