Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compiler] remove byre-fold and bump version to 1.9.1.0 #421

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion compiler/include/byteir/Dialect/Byre/Passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#ifndef BYTEIR_DIALECT_BYRE_PASSES_H
#define BYTEIR_DIALECT_BYRE_PASSES_H

#include "byteir/Dialect/Byre/Transforms/Fold.h"
#include "byteir/Dialect/Byre/Transforms/Serial.h"

namespace mlir {
Expand Down
9 changes: 0 additions & 9 deletions compiler/include/byteir/Dialect/Byre/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@

include "mlir/Pass/PassBase.td"

//===----------------------------------------------------------------------===//
// ByreFold
//===----------------------------------------------------------------------===//

def ByreFold : Pass<"byre-fold", "func::FuncOp"> {
let summary = "Fold Byre Ops";
let constructor = "mlir::createByreFoldPass()";
}

//===----------------------------------------------------------------------===//
// DumpByre
//===----------------------------------------------------------------------===//
Expand Down
33 changes: 0 additions & 33 deletions compiler/include/byteir/Dialect/Byre/Transforms/Fold.h

This file was deleted.

1 change: 0 additions & 1 deletion compiler/lib/Dialect/Byre/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ add_mlir_dialect_library(MLIRByreSerialization

add_mlir_dialect_library(ByteIRByrePasses
Transforms/BufferizableOpInterfaceImpl.cpp
Transforms/Fold.cpp
Transforms/Serial.cpp

ADDITIONAL_HEADER_DIRS
Expand Down
4 changes: 4 additions & 0 deletions compiler/lib/Dialect/Byre/IR/ByreDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,10 @@ struct CollapseAliasChain : public OpRewritePattern<AliasOp> {
cast<MemRefType>(sourceOp.getSource().getType()).getElementType());
auto curElemBitwidth = canonicalizeTypeBitWidth(
cast<MemRefType>(aliasOp.getSource().getType()).getElementType());

if (aliasOp.getOffset() * curElemBitwidth % srcElemBitwidth != 0) {
return failure();
}
auto newOffset = aliasOp.getOffset() * curElemBitwidth / srcElemBitwidth +
sourceOp.getOffset();
rewriter.replaceOpWithNewOp<AliasOp>(aliasOp,
Expand Down
166 changes: 0 additions & 166 deletions compiler/lib/Dialect/Byre/Transforms/Fold.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion compiler/python/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0.0
1.9.1.0
45 changes: 0 additions & 45 deletions compiler/test/Dialect/Byre/byreFold.mlir

This file was deleted.

13 changes: 13 additions & 0 deletions compiler/test/Dialect/Byre/canonicalize.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,23 @@ module attributes {byre.container_module} {
// CHECK-LABEL: func.func @remove_identity_alias
%0 = "byre.alias"(%arg0) {offset = 0 : i64} : (memref<256xf32>) -> memref<256xf32>
byre.compute @SomeOp(%0, %arg1) : memref<256xf32>, memref<256xf32>
// CHECK-NOT: byre.alias
// CHECK-NEXT: byre.compute @SomeOp(%arg0, %arg1)
return
}

func.func @not_fold_alias(%arg0: memref<256xf32> {byre.argtype = 1: i32, byre.argname = "A"}) attributes {byre.entry_point} {
// CHECK-LABEL: func.func @not_fold_alias
%0 = "byre.alias"(%arg0) {offset = 0 : i64} : (memref<256xf32>) -> memref<256xi8>
%1 = "byre.alias"(%0) {offset = 3 : i64} : (memref<256xi8>) -> memref<253xi8>
byre.compute @SomeOp(%1) : memref<253xi8>
// CHECK-NEXT: byre.alias
// CHECK-NEXT: byre.alias
// CHECK-NEXT: byre.compute @SomeOp
// CHECK-NEXT: return
return
}

func.func @test_group_copy(%arg0 : memref<100x?xf32> {byre.argtype = 1: i32, byre.argname = "A"}, %arg1 : memref<100x?xf32> {byre.argtype = 2: i32, byre.argname = "B"}, %arg2 : memref<200x?xf32> {byre.argtype = 1: i32, byre.argname = "C"}, %arg3 : memref<200x?xf32> {byre.argtype = 2: i32, byre.argname = "D"}) attributes {byre.entry_point} {
// CHECK-LABEL: func.func @test_group_copy
"byre.group_copy"(%arg0, %arg2, %arg1, %arg2) {callee = "d2h_array"} : (memref<100x?xf32>, memref<200x?xf32>, memref<100x?xf32>, memref<200x?xf32>) -> ()
Expand Down
2 changes: 1 addition & 1 deletion runtime/VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.0.0
1.9.1.0
Loading