/llvm-project/mlir/docs/ |
H A D | Quantization.md | 5 narrow scope of techniques in use to enable conversion of floating-point 7 for inference, as has historically been supported by low-bit depth inference 20 express fixed point and affine transformations via uniformly spaced point on the 25 * *per-layer* : Applying to every value within the target type. 26 * *per-axis* (also called *per-channel*) : Applying individually to each index 29 ### Fixed point values 31 [Fixed point](https://en.wikipedia.org/wiki/Fixed-point_arithmetic) values are a 38 scaled values. For example, if the scale is $ \pi $, then fixed point values 41 point value with a given $ scale $ is $ \frac{scale}{2} $. Continuing the 57 [adding a Real-valued *zero point*, to a scaled value](https://en.wikipedia.org/wiki/Affine_transfo… [all …]
|
/llvm-project/llvm/include/llvm/IR/ |
H A D | FixedPointBuilder.h | 1 //===- llvm/FixedPointBuilder.h - Builder for fixed-point ops ---*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 10 // way to lower fixed-point arithmetic operations to LLVM IR. 12 //===----------------------------------------------------------------------===// 51 // When converting to integers, we round towards zero. For negative in Convert() 55 Value *Zero = Constant::getNullValue(Result->getType()); in Convert() local 56 Value *IsNegative = B.CreateICmpSLT(Result, Zero); in Convert() 64 ? B.CreateAShr(Result, SrcScale - DstScale, "downscale") in Convert() 65 : B.CreateLShr(Result, SrcScale - DstScale, "downscale"); in Convert() [all …]
|
/llvm-project/clang/test/CodeGen/ |
H A D | fp-floatcontrol-pragma.cpp | 1 // RUN: %clang_cc1 -fexperimental-strict-floating-point -DEXCEPT=1 \ 2 // RUN: -fcxx-exceptions -triple x86_64-linux-gnu -emit-llvm -o - %s \ 3 // RUN: | FileCheck -check-prefix=CHECK-NS %s 5 // RUN: %clang_cc1 -fexperimental-strict-floating-point \ 6 // RUN: -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s \ 7 // RUN: -check-prefixes=CHECK-DEFAULT,CHECK-CONST-ARGS 9 // RUN: %clang_cc1 -fexperimental-strict-floating-point -DFENV_ON=1 \ 10 // RUN: -triple x86_64-linux-gnu -emit-llvm -o - %s \ 11 // RUN: | FileCheck -check-prefix=CHECK-FENV %s 13 // RUN: %clang_cc1 -fexperimental-strict-floating-point -DNF128 \ [all …]
|
/llvm-project/libc/src/__support/FPUtil/ |
H A D | FPBits.h | 1 //===-- Abstract class for bit manipulation of float numbers. ---*- C++ -*-===// 5 // SPDX-License-Identifie [all...] |
/llvm-project/mlir/test/CAPI/ |
H A D | quant.c | 1 //===- quant.c - Test of Quant dialect C API ------------------------------===// 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 8 //===----------------------------------------------------------------------===// 10 // RUN: mlir-capi-quant-test 2>&1 | FileCheck %s 12 #include "mlir-c/Dialect/Quant.h" 13 #include "mlir-c/BuiltinTypes.h" 14 #include "mlir-c/IR.h" 21 // CHECK-LABEL: testTypeHierarchy 27 ctx, mlirStringRefCreateFromCString("!quant.any<i8<-8:7>:f32>")); in testTypeHierarchy() 30 "!quant.uniform<i8<-8:7>:f32, 0.99872:127>")); in testTypeHierarchy() [all …]
|
/llvm-project/clang/test/SemaCXX/ |
H A D | warn-float-conversion.cpp | 1 …c1 -verify -fsyntax-only -triple x86_64-pc-linux-gnu %s -Wno-literal-conversion -Wfloat-conversion… 2 // RUN: %clang_cc1 -verify -fsyntax-only -triple x86_64-pc-linux-gnu %s -Wno-conversion -Wfloat-ove… 3 // RUN: %clang_cc1 -verify -fsyntax-only -triple x86_64-pc-linux-gnu %s -Wno-conversion -Wfloat-zer… 9 return f; //expected-warning{{conversion}} in ReturnBool() 13 return f; //expected-warning{{conversion}} in ReturnChar() 17 return f; //expected-warning{{conversion}} in ReturnInt() 21 return f; //expected-warning{{conversion}} in ReturnLong() 30 b = f; //expected-warning{{conversion}} in Convert() 31 b = d; //expected-warning{{conversion}} in Convert() 32 b = ld; //expected-warning{{conversion}} in Convert() [all …]
|
/llvm-project/llvm/docs/GlobalISel/ |
H A D | GenericOpcode.rst | 2 .. _gmir-opcodes: 13 scalar/integer/floating-point operations can also take vectors. 16 ------- [all...] |
/llvm-project/polly/lib/External/isl/imath/ |
H A D | imrat.h | 6 Copyright (C) 2002-2007 Michael J. Fromberger, All Rights Reserved. 44 static inline mp_int MP_NUMER_P(mp_rat Q) { return &(Q->num); } in MP_NUMER_P() 47 static inline mp_int MP_DENOM_P(mp_rat Q) { return &(Q->den); } in MP_DENOM_P() 57 /** Initializes `r` with 1-digit precision and sets it to zero. This function 61 /** Allocates a fresh zero-valued `mpq_t` on the heap, returning NULL in case 62 of error. The only possible error is out-of-memory. */ 65 /** Reduces `r` in-place to lowest terms and canonical form. 67 Zero is represented as 0/1, one as 1/1, and signs are adjusted so that the 72 and `d_prec` digits of storage for the denominator, and value zero. 74 If either precision is zero, the default precision is used, rounded up to [all …]
|
/llvm-project/mlir/lib/Dialect/Quant/Utils/ |
H A D | FakeQuantSupport.cpp | 1 //===- FakeQuantSupport.cpp - Support utilities for FakeQuant ops -------- [all...] |
/llvm-project/libc/src/__support/FPUtil/aarch64/ |
H A D | fenv_darwin_impl.h | 1 //===- darwin-aarch64 floating point env manipulation functions -*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2. 163 float zero = 0.0f; raise_except() local [all...] |
/llvm-project/libc/src/stdio/printf_core/ |
H A D | float_dec_converter.h | 1 //===-- Decimal Float Converter for printf -------- [all...] |
H A D | fixed_converter.h | 1 //===-- Fixed Point Converter for printf ------- [all...] |
/llvm-project/flang/lib/Decimal/ |
H A D | decimal-to-binary.cpp | 1 //===-- lib/Decimal/decimal-to-binary.cpp ---------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 9 #include "big-radix-floating-point.h" 10 #include "flang/Common/bit-population-count.h" 11 #include "flang/Common/leading-zero-bit-count.h" 12 #include "flang/Decimal/binary-floating-point.h" 14 #include "flang/Runtime/freestanding-tools.h" 39 isNegative_ = *q == '-'; in ParseNumber() 40 if (*q == '-' || *q == '+') { in ParseNumber() [all …]
|
/llvm-project/clang/include/clang/AST/ |
H A D | OperationKinds.def | 1 //===--- OperationKinds.def - Operations Database ---------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===// 39 //===- Cast Operations ---------------------------------------------------===// 41 /// CK_Dependent - A conversion which cannot yet be analyzed because 44 /// to even approximately type-check. 49 /// CK_BitCast - A conversion which causes a bit pattern of one type 53 /// The pointer conversion char* -> int* is a bitcast. A conversion 63 /// CK_LValueBitCast - A conversion which reinterprets the address of [all …]
|
/llvm-project/llvm/include/llvm/ADT/ |
H A D | FloatingPointMode.h | 1 //===- llvm/Support/FloatingPointMode.h -------------------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 10 /// Utilities for dealing with flags related to floating point properties and 13 //===----------------------------------------------------------------------===/ 27 /// of the modes must agree with IEEE-754, 4.3.1 and 4.3.2. The constants 33 /// the bit field (now - 3 bits). The value \c Invalid is used only in values 38 // Rounding mode defined in IEEE-754. 47 Invalid = -1 ///< Denotes invalid value. 68 /// Represent subnormal handling kind for floating point instruction inputs and [all …]
|
H A D | APFloat.h | 1 //===- llvm/ADT/APFloat.h - Arbitrary Precision Floating Point ---*- C++ -*-==// 5 // SPDX-Licens [all...] |
/llvm-project/polly/lib/External/isl/ |
H A D | isl_union_eval.c | 6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France, 13 /* Evaluate "u" in the void point "pnt". 29 * "pnt" is the point in which the function is evaluated. 30 * "v" stores the result and is initialized to zero. 37 /* Update the evaluation in data->v based on the evaluation of "part". 40 * is assumed to evaluate to anything other than zero. 41 * Since the value is initialized to zero, the evaluation of "part" 49 v = FN(PART,eval)(part, isl_point_copy(data->pnt)); in FN() 50 data->v = isl_val_add(data->v, v); in FN() 52 return isl_stat_non_null(data->v); in FN() [all …]
|
/llvm-project/llvm/include/llvm/Analysis/ |
H A D | ValueTracking.h | 1 //===- llvm/Analysis/ValueTracking.h - Walk computations --------* [all...] |
/llvm-project/libc/src/__support/ |
H A D | float_to_string.h | 1 //===-- Utilities to convert floating point values to string ----*- C++ -*- [all...] |
/llvm-project/mlir/include/mlir/Dialect/Arith/IR/ |
H A D | ArithOps.td | 1 //===- ArithOps.td - Arith op definitions -------- [all...] |
/llvm-project/clang/lib/Headers/ |
H A D | ammintrin.h | 1 /*===---- ammintrin.h - SSE4a intrinsics -----------------------------------=== 5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 *===-----------------------------------------------------------------------=== 22 /// Extracts the specified bits from the lower 64 bits of the 128-bit 37 /// are zero, the length is interpreted as 64. 41 /// the result is undefined. If the length and index are both zero, bits 42 /// [63:0] of parameter \a x are extracted. If the length is zero but the 43 /// index is non-zero, the result is undefined. 44 /// \returns A 128-bit integer vector whose lower 64 bits contain the bits 50 /// Extracts the specified bits from the lower 64 bits of the 128-bit [all …]
|
/llvm-project/clang/test/CodeGen/LoongArch/ |
H A D | abi-lp64d.c | 1 // RUN: %clang_cc1 -triple loongarch64 -target-feature +f -target-feature +d -target-abi lp64d \ 2 // RUN: -emit-llvm %s -o - | FileCheck %s 12 /// In most cases, the unsigned integer data types are zero-extended when stored 13 /// in general-purpose register, and the signed integer data types are 14 /// sign-extended. However, in the LP64D ABI, unsigned 32-bit types, such as 15 /// unsigned int, are stored in general-purpose registers as proper sign 16 /// extensions of their 32-bit values. 18 // CHECK-LABEL: define{{.*}} zeroext i1 @check_bool() 21 // CHECK-LABEL: define{{.*}} signext i8 @check_char() 24 // CHECK-LABEL: define{{.*}} signext i16 @check_short() [all …]
|
/llvm-project/libcxx/include/__format/ |
H A D | formatter_floating_point.h | 1 // -*- C++ -*- 2 //===------ [all...] |
/llvm-project/llvm/test/Transforms/Attributor/ |
H A D | denormal-fp-math.ll | 1 …en autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes --check-globals --ver… 2 ; RUN: opt -S -passes=attributor < %s | FileCheck %s 9 ; CHECK-LABEL: define internal void @leaf_dynamic_dynamic_from_ieee_ieee() { 10 ; CHECK-NEXT: call void @call_of_mystery() 11 ; CHECK-NEXT: ret void 19 ; CHECK-LABEL: define internal void @leaf_recursive_dynamic_dynamic_from_ieee_ieee() { 20 ; CHECK-NEXT: call void @call_of_mystery() 21 ; CHECK-NEXT: call void @leaf_recursive_dynamic_dynamic_from_ieee_ieee() 22 ; CHECK-NEXT: ret void 29 ; Should strip denormal-fp-math for default ieee [all …]
|
/llvm-project/libcxx/src/include/ |
H A D | to_chars_floating_point.h | 1 //===----------------------------------------------------------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 10 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 18 // clang-format off 51 static constexpr int32_t _Exponent_bits = sizeof(float) * CHAR_BIT - FLT_MANT_DIG; 53 static constexpr int32_t _Maximum_binary_exponent = FLT_MAX_EXP - 1; 54 static constexpr int32_t _Minimum_binary_exponent = FLT_MIN_EXP - 1; 58 static constexpr int32_t _Sign_shift = _Exponent_bits + _Mantissa_bits - 1; 59 static constexpr int32_t _Exponent_shift = _Mantissa_bits - 1; [all …]
|