Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for CustomAggregatorOp (0.24 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/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)
  3. tensorflow/compiler/mlir/quantization/stablehlo/cc/pre_calibration_test.cc

                                StartsWith("composite_dot_general_fn")));
    
      // 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/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)
  5. tensorflow/compiler/mlir/quantization/stablehlo/cc/post_calibration.h

    //
    // The resulting `ModuleOp` contains quantized StableHLO ops serialized in
    // `TF::XlaCallModuleOp`s. They are quantized using the statistics collected
    // after the calibration step, corresponding to each `TF::CustomAggregatorOp`s
    // in the input module op.
    class PostCalibrationComponent : public Component {
     public:
      // Name of the post-training quantization post-calibration step. Used for
      // debugging purposes.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Apr 15 12:53:33 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/statistics.cc

                          ReadStatistics(calibration_data_dir));
    
      absl::Status status = absl::OkStatus();
      module_op.walk([&py_function_library, &calibration_options, &status,
                      &statistics_map](mlir::TF::CustomAggregatorOp aggregator_op) {
        mlir::StringRef id = aggregator_op.getId();
        auto iter = statistics_map.find(id);
        if (iter == statistics_map.end()) {
          status = absl::InternalError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/cc/calibration/component.h

    //
    // The resulting `ModuleOp` contains quantized StableHLO ops serialized in
    // `TF::XlaCallModuleOp`s. They are quantized using the statistics collected
    // after the calibration step, corresponding to each `TF::CustomAggregatorOp`s
    // in the input module op.
    //
    // TODO: b/320607042 - Add tests for this component on the python layer.
    class CalibrationComponent : public Component {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

        const std::unordered_set<std::string>& aggregator_ops_to_ignore,
        SmallVector<Value>& statistics_outputs, SmallVector<StringRef>& ids,
        SmallVector<int32_t>& calibration_methods) {
      for (auto op : region.getOps<TF::CustomAggregatorOp>()) {
        if (aggregator_ops_to_ignore.count(op.getId().str())) continue;
    
        ids.push_back(op.getId());
        calibration_methods.push_back(op.getCalibrationMethod());
        statistics_outputs.push_back(op.getMin());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
Back to top