-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86][AMX] Add AMX FP8 new APIs (#115829)
This is a follow-up to #113850. Ref.: https://cdrdv2.intel.com/v1/dl/getContent/671368
- Loading branch information
Showing
8 changed files
with
343 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +amx-fp8 \ | ||
// RUN: -emit-llvm -o - -Werror -pedantic | FileCheck %s | ||
#include <immintrin.h> | ||
|
||
void test_tdpbf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { | ||
//CHECK-LABEL: @test_tdpbf8ps | ||
//CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) | ||
//CHECK-DAG: call x86_amx @llvm.x86.tdpbf8ps.internal | ||
//CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) | ||
__tile_dpbf8ps(&dst, src1, src2); | ||
} | ||
|
||
void test_tdpbhf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { | ||
//CHECK-LABEL: @test_tdpbhf8ps | ||
//CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) | ||
//CHECK-DAG: call x86_amx @llvm.x86.tdpbhf8ps.internal | ||
//CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) | ||
__tile_dpbhf8ps(&dst, src1, src2); | ||
} | ||
|
||
void test_tdphbf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { | ||
//CHECK-LABEL: @test_tdphbf8ps | ||
//CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) | ||
//CHECK-DAG: call x86_amx @llvm.x86.tdphbf8ps.internal | ||
//CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) | ||
__tile_dphbf8ps(&dst, src1, src2); | ||
} | ||
|
||
void test_tdphf8ps(__tile1024i src1, __tile1024i src2, __tile1024i dst) { | ||
//CHECK-LABEL: @test_tdphf8ps | ||
//CHECK-DAG: call x86_amx @llvm.x86.cast.vector.to.tile.v256i32(<256 x i32> {{%.*}}) | ||
//CHECK-DAG: call x86_amx @llvm.x86.tdphf8ps.internal | ||
//CHECK-DAG: call <256 x i32> @llvm.x86.cast.tile.to.vector.v256i32(x86_amx {{%.*}}) | ||
__tile_dphf8ps(&dst, src1, src2); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.