Skip to content

Commit

Permalink
Dropping WGSLReplacePushConstantsPass.
Browse files Browse the repository at this point in the history
The pass is running on HAL IR and now that descriptor sets are being
removed as part of #18154 needs to be rewritten. A new version would
operate on SPIR-V IR in order to replace push constants with special
binding loads instead.
  • Loading branch information
benvanik committed Aug 27, 2024
1 parent e044271 commit 758ef19
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 400 deletions.
7 changes: 0 additions & 7 deletions compiler/plugins/target/WebGPUSPIRV/WebGPUSPIRVTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,6 @@ class WebGPUSPIRVTargetBackend : public TargetBackend {

void buildTranslationPassPipeline(IREE::HAL::ExecutableTargetAttr targetAttr,
OpPassManager &passManager) override {
// WebGPU does not support push constants (yet?), so replace loads from
// push constants with loads from uniform buffers.
// The corresponding runtime code must perform similar emulation, based
// on the push constant count listed in the executable layout.
passManager.nest<ModuleOp>().nest<func::FuncOp>().addPass(
createWGSLReplacePushConstantsPass());

buildSPIRVCodegenPassPipeline(passManager);

// Prepare SPIR-V for WebGPU by expanding or removing unsupported ops.
Expand Down
1 change: 0 additions & 1 deletion compiler/src/iree/compiler/Codegen/WGSL/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ iree_compiler_cc_library(
name = "WGSL",
srcs = [
"Passes.cpp",
"WGSLReplacePushConstants.cpp",
],
hdrs = [
"Passes.h",
Expand Down
1 change: 0 additions & 1 deletion compiler/src/iree/compiler/Codegen/WGSL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ iree_cc_library(
"Passes.h"
SRCS
"Passes.cpp"
"WGSLReplacePushConstants.cpp"
DEPS
::PassHeaders
::PassesIncGen
Expand Down
7 changes: 0 additions & 7 deletions compiler/src/iree/compiler/Codegen/WGSL/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,4 @@ include "mlir/Pass/PassBase.td"
// WGSL passes (keep alphabetical)
//===---------------------------------------------------------------------===//

def WGSLReplacePushConstantsPass :
InterfacePass<"iree-wgsl-replace-push-constants", "mlir::FunctionOpInterface"> {
let summary =
"Replaces push constant loads with binding loads for when using "
"WGSL without push constant support";
}

#endif // IREE_CODEGEN_WGSL_PASSES
200 changes: 0 additions & 200 deletions compiler/src/iree/compiler/Codegen/WGSL/WGSLReplacePushConstants.cpp

This file was deleted.

1 change: 0 additions & 1 deletion compiler/src/iree/compiler/Codegen/WGSL/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ iree_lit_test_suite(
name = "lit",
srcs = enforce_glob(
[
"replace_push_constants.mlir",
],
include = ["*.mlir"],
),
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/iree/compiler/Codegen/WGSL/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ iree_add_all_subdirs()
iree_lit_test_suite(
NAME
lit
SRCS
"replace_push_constants.mlir"
TOOLS
FileCheck
iree-opt
Expand Down
Loading

0 comments on commit 758ef19

Please sign in to comment.