Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for addConversion (0.15 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_to_vhlo.cc

     public:
      StablehloToOdmlTypeConverter() : vhlo::VhloTypeConverter() {
        addConversion([](Type type) {
          if (type.getDialect().getNamespace() ==
              vhlo::VhloDialect::getDialectNamespace()) {
            return type;
          }
          LLVM_DEBUG(llvm::dbgs() << "Invalid type: " << type << '\n');
          return Type();
        });
        addConversion([](stablehlo::TokenType token) {
          return vhlo::TokenV1Type::get(token.getContext());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 19:48:51 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/flatbuffer_operator.h

     public:
      StablehloVhloTypeConverter() : mlir::vhlo::VhloTypeConverter() {
        addConversion([](mlir::Type type) -> mlir::Type {
          if (type.getDialect().getNamespace() ==
              mlir::vhlo::VhloDialect::getDialectNamespace()) {
            return type;
          }
          return {};
        });
        addConversion([](mlir::stablehlo::TokenType token) -> mlir::Type {
          return mlir::vhlo::TokenV1Type::get(token.getContext());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 16 21:00:09 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

    #include "tensorflow/core/platform/bfloat16.h"
    
    namespace mlir::quant::stablehlo {
    namespace {
    
    class BFloat16TypeConverter : public TypeConverter {
     public:
      BFloat16TypeConverter() {
        addConversion([](const Type type) -> Type {
          return IsLargeFloatType(type) ? ToBfloat16Type(type) : type;
        });
      }
    };
    
    // This helper function makes legality check easier. Both convert ops in the
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_with_tf2xla.cc

      // Currently, we don't do any type conversions. Any TensorFlow op with a type
      // that is not supported in MHLO will fail conversion. Quantized types are
      // going to handled separately so we don't need to handle those.
      addConversion([](Type ty) { return ty; });
    
      // This materialization is helpful in cases where we have more refined types
      // after conversion to mhlo compared to the original type in TF. For example,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc

        return false;
      }
      return true;
    }
    
    class TFQuantTypeConverter : public TypeConverter {
     public:
      TFQuantTypeConverter() {
        addConversion([](Type type) -> Type {
          return IsIllegalType(type) ? ToLegalType(type) : type;
        });
      }
    };
    
    // An Op is illegal iff it is non-UQ op and it contains qint types.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.6K bytes
    - Viewed (0)
Back to top