Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for GetQuantizationMethod (0.35 sec)

  1. tensorflow/compiler/mlir/quantization/common/lift_as_function_call_test.cc

      auto xla_call_module_ops = main_fn.getOps<TF::XlaCallModuleOp>();
      ASSERT_FALSE(xla_call_module_ops.empty());
    
      // Test that `GetQuantizationMethod` returns a valid `Method` corresponding to
      // `"no_quantization {}"`.
      const absl::StatusOr<Method> method =
          GetQuantizationMethod(*xla_call_module_ops.begin());
      ASSERT_THAT(method, IsOk());
      EXPECT_TRUE(method->has_no_quantization());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec.cc

    bool IsDenylistedLiftedFunction(Operation* op) {
      if (auto xla_call_module_op = dyn_cast_or_null<TF::XlaCallModuleOp>(op);
          xla_call_module_op != nullptr) {
        absl::StatusOr<Method> method = GetQuantizationMethod(xla_call_module_op);
        if (method.ok() && method->has_no_quantization()) {
          return true;
        }
      }
      return false;
    }
    
    // Populates `spec.coeff_op_quant_dim` according to `xla_call_module_op`'s
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 05:56:10 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

      int batch_dim_size = std::max(rhs_batch_dim_size, lhs_batch_dim_size);
      return lhs_out_idx_start >= batch_dim_size &&
             rhs_out_idx_start >= batch_dim_size;
    }
    
    absl::StatusOr<Method> GetQuantizationMethod(absl::Nonnull<Operation*> op) {
      const auto quantization_method_attr =
          op->getAttrOfType<StringAttr>(kQuantizationMethodAttr);
      if (!quantization_method_attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/cc/report.cc

      if (!callee_name.starts_with(kQuantizedFuncPrefix)) {
        return std::nullopt;  // `call_op` is not a quantized function call.
      }
    
      absl::StatusOr<Method> method = GetQuantizationMethod(call_op);
      if (!method.ok()) {
        call_op->emitError() << "Failed to get quantization method: "
                             << method.status().ToString();
        return std::nullopt;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.h

    // `absl::InvalidArgumentError` when the attribute doesn't exist. Returns
    // `absl::InternalError` when parsing the attribute to `Method` failed.
    // `op` must be non-null.
    absl::StatusOr<::stablehlo::quantization::Method> GetQuantizationMethod(
        absl::Nonnull<Operation*> op);
    
    // Gets the quantization method from `op`. It is retrieved from the
    // `kQuantizationMethodAttr` string attribute. Returns a default instance of
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

      if (!op) return false;
      if (auto xla_call_module_op = dyn_cast_or_null<TF::XlaCallModuleOp>(op);
          xla_call_module_op != nullptr) {
        absl::StatusOr<Method> method = GetQuantizationMethod(xla_call_module_op);
        if (method.ok() && method->has_static_range_ptq()) return true;
      }
    
      TF::PartitionedCallOp call_op = dyn_cast_or_null<TF::PartitionedCallOp>(op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
Back to top