Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for custom_aggregator_op (0.29 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/custom_aggregator_op.cc

          TF_RETURN_IF_ERROR(c->GetAttr("num_bins", &num_bins_attr));
          c->set_output(3, c->MakeShape({num_bins_attr->i()}));
    
          return absl::OkStatus();
        });
    
    class CustomAggregatorOp : public OpKernel {
     public:
      explicit CustomAggregatorOp(OpKernelConstruction* context)
          : OpKernel(context) {
        OP_REQUIRES_OK(context, context->GetAttr("id", &id_));
    
        int calibration_method_value;
        int num_bins;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/calibrator/BUILD

            "//tensorflow/core:test",
            "//tensorflow/core:test_main",
            "@com_google_googletest//:gtest_main",
        ],
    )
    
    tf_kernel_library(
        name = "custom_aggregator_op",
        srcs = ["custom_aggregator_op.cc"],
        compatible_with = get_compatible_with_portable(),
        visibility = [
            "//tensorflow:__pkg__",
            "//tensorflow/compiler/mlir/quantization/tensorflow/python:__pkg__",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 13 01:31:23 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/cc/pre_calibration_test.cc

      // Tests that there are CustomAggregatorOps inserted.
      SmallVector<TF::CustomAggregatorOp> custom_aggregator_ops;
      for (auto custom_aggregator_op :
           func_ops[0].getOps<TF::CustomAggregatorOp>()) {
        custom_aggregator_ops.push_back(custom_aggregator_op);
      }
      EXPECT_THAT(custom_aggregator_ops, SizeIs(2));
    }
    
    }  // namespace
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Mar 28 21:41:08 UTC 2024
    - 6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/replace_stablehlo_ops_in_main_function_with_xla_call_module_ops.mlir

      // CHECK: %[[CUSTOM_AGGREGATOR_0:.*]], {{.*}}, {{.*}}, {{.*}} = "tf.CustomAggregator"(%arg0) <{calibration_method = 1 : i32, id = "0", max_percentile = 0.000000e+00 : f32, min_percentile = 0.000000e+00 : f32, num_bins = 0 : i32}>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 39.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/tests/components/pre_calibration_component.mlir

    // CHECK: %[[CUSTOM_AGGREGATOR_1:.+]], {{.*}}, {{.*}}, {{.*}} = "tf.CustomAggregator"(%[[XLA_CALL_MODULE]]) {{.*}} : (tensor<1x4x4x8xf32>) -> (tensor<1x4x4x8xf32>, tensor<f32>, tensor<f32>, tensor<0xi64>)
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/insert_calibration_statistics_saver_with_skipping.mlir

    // CHECK-LABEL: @serving_default
    // CHECK: %[[CUSTOM_AGGREGATOR_0:.*]], %[[MIN_O:.*]], %[[MAX_O:.*]], %[[HISTOGRAM_0:.*]] = "tf.CustomAggregator"
    // CKECK-SAME: <{calibration_method = 5 : i32, id = "skipping_id", num_bins = 32 : i32, max_percentile = 0.000000e+00 : f32, min_percentile = 0.000000e+00 : f32}> : (tensor<1x3x4x3xf32>) -> (tensor<1x3x4x3xf32>, tensor<f32>, tensor<f32>, tensor<512xi64>)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

                                    PatternRewriter &rewriter) const override {
        // Return early if the given operator is the custom aggregator op.
        if (dyn_cast_or_null<TF::CustomAggregatorOp>(op)) return failure();
    
        // The CustomAggregatorOp is only added after quantizable values.
        SmallVector<Value> quantizable_values;
        SmallVector<std::string> aggregator_ids;
        if (IsCallToQuantizableLiftedFunction(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)
  8. tensorflow/compiler/mlir/quantization/stablehlo/tests/passes/insert_calibration_statistics_saver.mlir

    }
    // CHECK-LABEL: @serving_default
    // CHECK: %[[CUSTOM_AGGREGATOR_0:.*]], %[[MIN_O:.*]], %[[MAX_O:.*]], %[[HISTOGRAM_0:.*]] = "tf.CustomAggregator"
    // CKECK-SAME: <{calibration_method = 5 : i32, id = "0", num_bins = 32 : i32, max_percentile = 0.000000e+00 : f32, min_percentile = 0.000000e+00 : f32}> : (tensor<1x3x4x3xf32>) -> (tensor<1x3x4x3xf32>, tensor<f32>, tensor<f32>, tensor<512xi64>)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 24.3K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

        : public OpRewritePattern<TF::CustomAggregatorOp> {
     public:
      // Does not take ownership of context, which must refer to a valid value that
      // outlives this object.
      explicit ConvertCustomAggregationOpToQuantStats(MLIRContext *context)
          : OpRewritePattern<TF::CustomAggregatorOp>(context) {}
    
      LogicalResult matchAndRewrite(TF::CustomAggregatorOp op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/cc/pre_calibration.h

    namespace mlir::quant::stablehlo {
    
    // Performs pre-calibration graph transformation as part of post-training
    // static-range quantization.
    
    // The resulting `ModuleOp` contains `TF::CustomAggregatorOp`s for collecting
    // quantization statistics, along with `TF::XlaCallModuleOp`s that correspond to
    // lifted quantizable functions.
    class PreCalibrationComponent : public Component {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 11 19:29:56 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top