Skip to content

Commit 62665df

Browse files
committed
address qedawkins's comments
Signed-off-by: hanhanW <hanhan0912@gmail.com>
1 parent bbef6c4 commit 62665df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/src/iree/compiler/Codegen/Common/PropagateDispatchConfig.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ void PropagateDispatchConfigPass::runOnOperation() {
3535
return;
3636
}
3737

38-
// Collect all dispatch_config ops.
39-
SmallVector<IREE::Codegen::DispatchConfigOp> configOps;
40-
innerModule->walk(
41-
[&](IREE::Codegen::DispatchConfigOp op) { configOps.push_back(op); });
38+
// Collect all dispatch_config ops. These are direct children of the module
39+
// (like func.func), so no walk needed.
40+
SmallVector<IREE::Codegen::DispatchConfigOp> configOps =
41+
llvm::to_vector(innerModule.getOps<IREE::Codegen::DispatchConfigOp>());
4242
if (configOps.empty()) {
4343
return;
4444
}
@@ -99,7 +99,7 @@ void PropagateDispatchConfigPass::runOnOperation() {
9999
}
100100

101101
// Set workgroup_size and subgroup_size on the export.
102-
auto wgSize = configOp.getWorkgroupSize();
102+
std::optional<ArrayRef<int64_t>> wgSize = configOp.getWorkgroupSize();
103103
if (!wgSize) {
104104
configOp.emitError("missing workgroup_size attribute");
105105
return signalPassFailure();

0 commit comments

Comments
 (0)