Skip to content

Commit

Permalink
Pass indexing map by reference
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 659922479
  • Loading branch information
vwbaker authored and copybara-github committed Aug 6, 2024
1 parent 4756a86 commit 6eef582
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion xla/service/gpu/fusions/mlir/ir/xla_gpu_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ void ApplyIndexingOp::build(OpBuilder& builder, OperationState& result,
}

void ApplyIndexingOp::build(OpBuilder& builder, OperationState& result,
ValueRange operands, IndexingMap indexing_map) {
ValueRange operands,
const IndexingMap& indexing_map) {
SmallVector<Type, 2> result_types(indexing_map.GetAffineMap().getNumResults(),
builder.getIndexType());
IndexingMapAttr indexing_map_attr =
Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/fusions/mlir/ir/xla_gpu_ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def ApplyIndexingOp : XLAGPU_Op<"apply_indexing", [Pure]> {
OpBuilder<(ins "mlir::ValueRange":$dims, "mlir::ValueRange":$symbols,
"const IndexingMap&":$indexing_map)>,
OpBuilder<(ins "mlir::ValueRange":$operands,
"IndexingMap":$indexing_map)>,
"const IndexingMap&":$indexing_map)>,
OpBuilder<(ins "mlir::ValueRange":$operands, "mlir::AffineMap":$affine_map,
"llvm::ArrayRef<DimVar>":$dim_vars,
"llvm::ArrayRef<RangeVar>":$range_vars)>,
Expand Down

0 comments on commit 6eef582

Please sign in to comment.