Home
last modified time | relevance | path

Searched refs:bf16 (Results 1 – 25 of 150) sorted by relevance

123456

/external/rust/crates/half/src/
Dbfloat.rs37 pub struct bf16(u16); struct
39 impl bf16 { implementation
42 pub const fn from_bits(bits: u16) -> bf16 { in from_bits() argument
43 bf16(bits) in from_bits()
52 pub fn from_f32(value: f32) -> bf16 { in from_f32() argument
53 bf16(convert::f32_to_bf16(value)) in from_f32()
63 pub fn from_f64(value: f64) -> bf16 { in from_f64() argument
64 bf16(convert::f64_to_bf16(value)) in from_f64()
135 pub fn from_le_bytes(bytes: [u8; 2]) -> bf16 { in from_le_bytes() argument
136 bf16::from_bits(u16::from_le_bytes(bytes))
[all …]
Dslice.rs14 use crate::{bf16, binary16::convert, f16};
297 use crate::{bf16, f16};
301 impl SealedHalfFloatSlice for [bf16] {} implementation
459 impl HalfFloatSliceExt for [bf16] { implementation
487 self[i] = bf16::from_f32(*f); in convert_from_f32_slice()
500 self[i] = bf16::from_f64(*f); in convert_from_f64_slice()
637 use crate::{bf16, f16};
679 bf16::E.to_bits(), in test_slice_conversions_bf16()
680 bf16::PI.to_bits(), in test_slice_conversions_bf16()
681 bf16::EPSILON.to_bits(), in test_slice_conversions_bf16()
[all …]
Dvec.rs18 use super::{bf16, f16, slice::HalfFloatSliceExt};
109 use crate::{bf16, f16};
115 impl SealedHalfFloatVec for Vec<bf16> {}
163 impl HalfFloatVecExt for Vec<bf16> {
258 use crate::{bf16, f16};
284 let numbers = vec![bf16::E, bf16::PI, bf16::EPSILON, bf16::FRAC_1_SQRT_2]; in test_vec_conversions_bf16()
286 bf16::E.to_bits(), in test_vec_conversions_bf16()
287 bf16::PI.to_bits(), in test_vec_conversions_bf16()
288 bf16::EPSILON.to_bits(), in test_vec_conversions_bf16()
289 bf16::FRAC_1_SQRT_2.to_bits(), in test_vec_conversions_bf16()
[all …]
Dlib.rs90 pub use bfloat::bf16;
102 bf16, f16,
112 use crate::{bf16, f16};
117 impl SealedHalf for bf16 {} implementation
/external/llvm-project/llvm/test/MC/ARM/
Dbfloat16-a32.s4 vdot.bf16 d3, d4, d5
6 vdot.bf16 q0, q1, q2
8 vdot.bf16 d3, d4, d5[1]
10 vdot.bf16 q0, q1, d5[1]
12 vmmla.bf16 q0, q1, q2
14 vcvt.bf16.f32 d1, q3
16 vcvtbeq.bf16.f32 s1, s3
18 vcvttne.bf16.f32 s1, s3
20 vfmat.bf16 q0, q0, q0
22 vfmat.bf16 q0, q0, q15
[all …]
Dbfloat16-a32-errors2.s2 vfmat.bf16 d0, d0, d0
3 vfmat.bf16 d0, d0, q0
4 vfmat.bf16 d0, q0, d0
5 vfmat.bf16 q0, d0, d0
6 vfmat.bf16 q0, q0, d0
7 vfmat.bf16 q0, d0, q0
8 vfmat.bf16 d0, q0, q0
9 vfmat.bf16 q0, q0, q0[3]
10 vfmat.bf16 q0, q0, q0[3]
11 vfmat.bf16 q0, d0, d0[0]
[all …]
Dbfloat16-t32-errors.s3 vdot.bf16 d3, d4, d5
7 vdot.bf16 q0, q1, q2
11 vdot.bf16 d3, d4, d5[1]
15 vdot.bf16 q0, q1, d5[1]
19 vmmla.bf16 q0, q1, q2
23 vcvt.bf16.f32 d1, q3
27 vcvtbeq.bf16.f32 s1, s3
30 vcvttne.bf16.f32 s1, s3
Dbfloat16-a32-errors.s5 vdot.bf16 d3, d4, d5
6 vdot.bf16 q0, q1, q2
7 vdot.bf16 d3, d4, d5[1]
8 vdot.bf16 q0, q1, d5[1]
9 vmmla.bf16 q0, q1, q2
10 vcvt.bf16.f32 d1, q3
11 vcvtbeq.bf16.f32 s1, s3
12 vcvttne.bf16.f32 s1, s3
Dbfloat16-t32.s4 vcvt.bf16.f32 d1, q3
8 vcvtbeq.bf16.f32 s1, s3
13 vcvttne.bf16.f32 s1, s3
/external/llvm-project/clang/test/Sema/
Darm-bfloat.cpp9 __bf16 bf16; in test() local
11 bf16 + bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} in test()
12 bf16 - bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} in test()
13 bf16 * bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} in test() local
14 bf16 / bf16; // expected-error {{invalid operands to binary expression ('__bf16' and '__bf16')}} in test()
18 bf16 + fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} in test()
19 fp16 + bf16; // expected-error {{invalid operands to binary expression ('__fp16' and '__bf16')}} in test()
20 bf16 - fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} in test()
21 fp16 - bf16; // expected-error {{invalid operands to binary expression ('__fp16' and '__bf16')}} in test()
22 bf16 * fp16; // expected-error {{invalid operands to binary expression ('__bf16' and '__fp16')}} in test()
[all …]
/external/llvm-project/llvm/test/MC/Disassembler/ARM/
Dbfloat16-a32_1.txt1 # RUN: llvm-mc -triple arm-none-linux-gnu -mattr=+bf16,+neon --disassemble < %s | FileCheck %s
3 # RUN: llvm-mc -triple arm-none-linux-gnu -mattr=-bf16 --disassemble < %s 2>&1 | FileCheck %s --ch…
9 # CHECK: vdot.bf16 d3, d4, d5[1]
13 # CHECK-NEXT: vdot.bf16 q0, q1, d5[1]
17 # CHECK-NEXT: vcvtbeq.bf16.f32 s1, s3
21 # CHECK-NEXT: vcvttne.bf16.f32 s1, s3
25 # CHECK-NEXT: vfmat.bf16 q0, q0, q0
29 # CHECK-NEXT: vfmat.bf16 q0, q0, q15
33 # CHECK-NEXT: vfmat.bf16 q0, q15, q0
37 # CHECK-NEXT: vfmat.bf16 q0, q15, q15
[all …]
Dbfloat16-t32.txt1 # RUN: llvm-mc -triple thumbv8-none-linux-gnu -mattr=+bf16,+neon --disassemble < %s | FileCheck %s
6 # CHECK: vdot.bf16 d3, d4, d5
7 # CHECK: vdot.bf16 q0, q1, q2
10 # CHECK: vdot.bf16 d3, d4, d5[1]
13 # CHECK: vdot.bf16 q0, q1, d5[1]
16 # CHECK: vmmla.bf16 q0, q1, q2
19 # CHECK: vcvt.bf16.f32 d1, q3
22 # CHECK: vcvtb.bf16.f32 s1, s3
25 # CHECK: vcvtt.bf16.f32 s1, s3
Dbfloat16-a32_2.txt1 # RUN: llvm-mc -triple arm-none-linux-gnu -mattr=+bf16,+neon --disassemble < %s | FileCheck %s
3 # RUN: not llvm-mc -triple arm-none-linux-gnu -mattr=-bf16 --disassemble < %s 2>&1 | FileCheck %s …
7 # CHECK: vdot.bf16 d3, d4, d5
11 # CHECK: vdot.bf16 q0, q1, q2
15 # CHECK: vmmla.bf16 q0, q1, q2
19 # CHECK: vcvt.bf16.f32 d1, q3
/external/rust/crates/half/benches/
Dconvert.rs234 |b: &mut Bencher<'_>, i: &f32| b.iter(|| bf16::from_f32(*i)), in bench_f32_to_bf16()
254 |b: &mut Bencher<'_>, i: &f64| b.iter(|| bf16::from_f64(*i)), in bench_f64_to_bf16()
274 |b: &mut Bencher<'_>, i: &bf16| b.iter(|| i.to_f32()), in bench_bf16_to_f32()
276 bf16::ZERO, in bench_bf16_to_f32()
277 bf16::NEG_ZERO, in bench_bf16_to_f32()
278 bf16::ONE, in bench_bf16_to_f32()
279 bf16::MIN, in bench_bf16_to_f32()
280 bf16::MAX, in bench_bf16_to_f32()
281 bf16::MIN_POSITIVE, in bench_bf16_to_f32()
282 bf16::NEG_INFINITY, in bench_bf16_to_f32()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/
Dconvert.mlir116 func @const_int_bf16() -> tensor<bf16> {
117 // CHECK-NEXT: [[CST:%.+]] = mhlo.constant dense<4.{{0*}}e+00> : tensor<bf16>
119 %0 = "mhlo.convert"(%cst) : (tensor<i32>) -> tensor<bf16>
121 return %0 : tensor<bf16>
140 %cst = mhlo.constant dense<42.0> : tensor<bf16>
141 %0 = "mhlo.convert"(%cst) : (tensor<bf16>) -> tensor<i16>
204 func @const_f32_bf16() -> tensor<bf16> {
205 // CHECK-NEXT: [[CST:%.+]] = mhlo.constant dense<4.2{{0*}}e+01> : tensor<bf16>
207 %0 = "mhlo.convert"(%cst) : (tensor<f32>) -> tensor<bf16>
209 return %0 : tensor<bf16>
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/mlir2graphdef/
Dconvert_tensor.mlir7 …f.Const"() {device = "", dtype = bf16, value = dense<[4.900000e+01, 8.200000e+02]> : tensor<2xbf16…
8 … wraps "tf.Const"() {device = "", dtype = bf16, value = dense<0.000000e+00> : tensor<bf16>} : () -…
/external/llvm-project/llvm/test/CodeGen/ARM/
Darm-bf16-dotprod-intrinsics.ll2 ; RUN: llc -mtriple armv8.6a-arm-none-eabi -mattr=+neon,+bf16 -float-abi=hard -verify-machineinstrs…
7 ; CHECK-NEXT: vdot.bf16 d0, d1, d2
17 ; CHECK-NEXT: vdot.bf16 q0, q1, q2
27 ; CHECK-NEXT: vdot.bf16 d0, d1, d2[0]
41 ; CHECK-NEXT: vdot.bf16 q0, q1, q8
54 ; CHECK-NEXT: vdot.bf16 d0, d1, d3[1]
68 ; CHECK-NEXT: vdot.bf16 q0, q1, d4[0]
81 ; CHECK-NEXT: vmmla.bf16 q0, q1, q2
91 ; CHECK-NEXT: vfmab.bf16 q0, q1, q2
101 ; CHECK-NEXT: vfmat.bf16 q0, q1, q2
[all …]
Dbf16-convert-intrinsics.ll2 ; RUN: llc < %s -verify-machineinstrs -mtriple=armv8.6a-arm-none-eabi -mattr=+neon,+bf16,+fullfp16 …
12 ; CHECK-NEXT: vcvt.bf16.f32 d0, q0
22 ; CHECK-NEXT: vcvtb.bf16.f32 s0, s0
37 ; CHECK-NEXT: vcvt.bf16.f32 d16, q8
50 ; CHECK-NEXT: vcvtb.bf16.f32 s0, s0
/external/rust/crates/half/
DREADME.md1 # `f16` and `bf16` floating point types for Rust
6 as well as a `bf16` type implementing the [`bfloat16`](https://en.wikipedia.org/wiki/Bfloat16_float…
10 The `f16` and `bf16` types provides conversion operations as a normal Rust floating point type, but…
22 - **`serde`** - Implement `Serialize` and `Deserialize` traits for `f16` and `bf16`. This adds a de…
25 - **`use-intrinsics`** - Use hardware intrinsics for `f16` and `bf16` conversions if available on t…
32 …raw `Vec<u16>` bits and `Vec<f16>` or `Vec<bf16>` arrays, and vice versa. *Requires Rust 1.36 or g…
DCHANGELOG.md19 format raw `f16`/`bf16` bytes to string.
22 - `Debug` trait implementation now formats `f16`/`bf16` as float instead of raw bytes hex. Use newly
28 - Added `LOG2_10` and `LOG10_2` constants to both `f16` and `bf16`, which were added to `f32` and
30 - Added `to_le/be/ne_bytes` and `from_le/be/ne_bytes` to both `f16` and `bf16`, which were added to
40 - Added `#[repr(transparent)]` to `f16`/`bf16` to remove undefined behavior. By [@jfrimmel].
44 - Added a `bf16` type implementing the alternative
51 `[bf16]`. These traits will use hardware SIMD conversion instructions when available and the
54 performing efficient reinterpret casts to and from `Vec<f16>` and `Vec<bf16>`. These traits
57 prelude imports `f16`, `bf16`, and the new slice and vec extension traits.
/external/llvm-project/llvm/include/llvm/CodeGen/
DValueTypes.td29 def bf16 : ValueType<16 , 8>; // 16-bit brain floating point value
104 def v2bf16 : ValueType<32 , 76>; // 2 x bf16 vector value
105 def v3bf16 : ValueType<48 , 77>; // 3 x bf16 vector value
106 def v4bf16 : ValueType<64 , 78>; // 4 x bf16 vector value
107 def v8bf16 : ValueType<128, 79>; // 8 x bf16 vector value
108 def v16bf16 : ValueType<256, 80>; // 16 x bf16 vector value
109 def v32bf16 : ValueType<512, 81>; // 32 x bf16 vector value
110 def v64bf16 : ValueType<1024, 82>; // 64 x bf16 vector value
111 def v128bf16 : ValueType<2048, 83>; // 128 x bf16 vector value
179 def nxv2bf16 : ValueType<32 , 145>; // n x 2 x bf16 vector value
[all …]
/external/llvm-project/mlir/test/Dialect/SPIRV/
Darithmetic-ops.mlir65 func @fmul_bf16(%arg: bf16) -> bf16 {
67 %0 = spv.FMul %arg, %arg : bf16
68 return %0 : bf16
/external/llvm-project/llvm/test/CodeGen/AArch64/
Dsve2-intrinsics-contiguous-conflict-detection.ll47 %out = call <vscale x 8 x i1> @llvm.aarch64.sve.whilerw.h.nx8i1.bf16.bf16(bfloat* %a, bfloat* %b)
115 %out = call <vscale x 8 x i1> @llvm.aarch64.sve.whilewr.h.nx8i1.bf16.bf16(bfloat* %a, bfloat* %b)
148 declare <vscale x 8 x i1> @llvm.aarch64.sve.whilerw.h.nx8i1.bf16.bf16(bfloat* %a, bfloat* %b)
158 declare <vscale x 8 x i1> @llvm.aarch64.sve.whilewr.h.nx8i1.bf16.bf16(bfloat* %a, bfloat* %b)
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/
Dtpu_parallel_execute_sink_resource_write.mlir119 …[ARG1:%.+]]: tensor<i32>, [[ARG2:%.+]]: tensor<i64>, [[ARG3:%.+]]: tensor<bf16>, [[ARG4:%.+]]: ten…
120 …(%arg0: tensor<i1>, %arg1: tensor<i32>, %arg2: tensor<i64>, %arg3: tensor<bf16>, %arg4: tensor<f32…
129 // CHECK-NEXT: tf_device.return [[ARG3]], [[ARG5]] : tensor<bf16>, tensor<f64>
130 tf_device.return %arg3, %arg4, %arg5 : tensor<bf16>, tensor<f32>, tensor<f64>
131 // CHECK-NEXT: }) : () -> (tensor<i1>, tensor<i64>, tensor<bf16>, tensor<f64>)
132 }) : () -> (tensor<i1>, tensor<i32>, tensor<i64>, tensor<bf16>, tensor<f32>, tensor<f64>)
/external/tensorflow/tensorflow/core/framework/
Dtensor_util.h163 bfloat16 bf16;
164 bf16.value = static_cast<uint16>(x);
165 return bf16;
170 std::transform(begin, end, dst, [](bfloat16 bf16) -> int {
171 return static_cast<int>(bf16.value);

123456