Skip to content

Commit

Permalink
-Adds tpp-opt -default-pipeline compilation test for amx-bf16 feature.
Browse files Browse the repository at this point in the history
-Removes the fragile test from integration.
  • Loading branch information
shahidact committed Feb 18, 2025
1 parent cf784c7 commit c63efe2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
22 changes: 0 additions & 22 deletions test/Integration/tpp-run-amx-feature-initialization.mlir

This file was deleted.

23 changes: 23 additions & 0 deletions test/Passes/DefaultPipeline/amx-initialization.mlir
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// RUN: tpp-opt --default-pipeline %s | FileCheck %s
// RUN: LIBXSMM_TARGET=spr tpp-opt --default-pipeline %s | FileCheck %s --check-prefix=CHECK-AMX-BF16

// CHECK-LABEL: llvm.func @entry
// CHECK: builtin.unrealized_conversion_cast
// CHECK: amx.tile_mulf
// CHECK-NOT: amx.tilestored64

// CHECK-AMX-BF16-LABEL: llvm.func @entry
// CHECK-AMX-BF16: amx.tileloadd64
// CHECK-AMX-BF16: amx.tdpbf16ps
// CHECK-AMX-BF16: amx.tilestored64
func.func @entry(%arg0: memref<16x32xbf16>,
%arg1: memref<16x32xbf16>,
%arg2: memref<16x16xf32>) {
%0 = arith.constant 0 : index
%1 = amx.tile_load %arg0[%0, %0] : memref<16x32xbf16> into !amx.tile<16x32xbf16>
%2 = amx.tile_load %arg1[%0, %0] : memref<16x32xbf16> into !amx.tile<16x32xbf16>
%3 = amx.tile_zero : !amx.tile<16x16xf32>
%4 = amx.tile_mulf %1, %2, %3 : !amx.tile<16x32xbf16>, !amx.tile<16x32xbf16>, !amx.tile<16x16xf32>
amx.tile_store %arg2[%0, %0], %4 : memref<16x16xf32>, !amx.tile<16x16xf32>
return
}

0 comments on commit c63efe2

Please sign in to comment.