Previously, only case when TargetEnv was attached to the top level ModuleOp was supported.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks! Generally LGTM; I just have one question actually.
mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp | ||
---|---|---|
342 | The spirv.target_env should only be needed when _converting to_ SPIR-V? Once that's done we are in SPIR-V land already; it should not be necessary anymore. So curious why would you need to copy it over? |
mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp | ||
---|---|---|
342 | Some of the patterns (specifically GPUFuncOpConversion) calls lookupTargetEnvOrDefault themselves during conversion and they won't find it if they run after GPUModuleConversion. Also we will need to preserve it if we ever decide to switch to progressive lowering. |
mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp | ||
---|---|---|
342 | Good points. Would mind to put the above as comments so later we know why this is needed? Thanks! |
The spirv.target_env should only be needed when _converting to_ SPIR-V? Once that's done we are in SPIR-V land already; it should not be necessary anymore. So curious why would you need to copy it over?