Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 114 for getFAttr (0.29 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_custom_aggregation_ops.cc

        if (!entry_function_attr) return std::nullopt;
        return entry_function_attr.getValue();
      } else {
        TF::PartitionedCallOp call_op = dyn_cast_or_null<TF::PartitionedCallOp>(op);
        const auto f_attr = call_op.getFAttr().dyn_cast<FlatSymbolRefAttr>();
        if (!f_attr) return std::nullopt;
        return f_attr.getValue();
      }
    }
    
    class InsertCustomAggregationOpsPass
        : public PassWrapper<InsertCustomAggregationOpsPass,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

     private:
      LogicalResult matchAndRewrite(TF::TPUPartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
        auto module_op = call_op->getParentOfType<ModuleOp>();
        SymbolTable symbol_table(module_op);
    
        auto f_name = f_attr.getValue();
        func::FuncOp float_func =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize.cc

      static bool AllowDynamicRangeQuantizedOperand(
          Operation* quantized_op, const CustomMap& custom_op_map) {
        auto call_op = cast<TF::PartitionedCallOp>(quantized_op);
        StringRef function_name =
            call_op.getFAttr().cast<FlatSymbolRefAttr>().getValue();
        // The below can be generalized as there are more read-only ops added such
        // as slice.
        const bool is_gather = function_name.contains("gather");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 05:52:39 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

      }
    
      LogicalResult matchAndRewrite(TF::PartitionedCallOp op,
                                    PatternRewriter& rewriter) const override {
        const auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(op.getFAttr());
        StringRef function_name = f_attr.getValue();
        if (!function_name.starts_with(kDequantizeFunctionName)) return failure();
    
        llvm::SmallVector<Operation*> users(op->getUsers().begin(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/ops/tf_op_quant_spec.cc

      auto spec = std::make_unique<OpQuantSpec>();
      if (auto call_op = dyn_cast<TF::PartitionedCallOp>(op)) {
        StringRef function_name =
            mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue();
        if (!function_name.starts_with("composite_")) {
          return spec;
        }
        if (function_name.contains("depthwise_conv2d")) {
          spec->coeff_op_quant_dim[1] = 3;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td

        func::FuncOp ResolveFunc(::mlir::SymbolTableCollection* table) {
          if (table)
            return table->lookupNearestSymbolFrom<func::FuncOp>(*this, getFAttr());
          return SymbolTable::lookupNearestSymbolFrom<func::FuncOp>(*this, getFAttr());
        }
        // TODO(b/204997177): Deprecate and remove.
        func::FuncOp func() {  return ResolveFunc(nullptr); }
      }];
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 04:08:35 UTC 2024
    - 90.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/lift_quantizable_spots_as_functions_drq.cc

                << min_num_elements_for_weights_ << " elements).";
            call_op->removeAttr(kQuantTraitAttrName);
          }
        }
    
        StringRef function_name =
            mlir::cast<FlatSymbolRefAttr>(call_op.getFAttr()).getValue();
        if ((quantization_method_ == tensorflow::quantization::QuantizationMethod::
                                         METHOD_DYNAMIC_RANGE_INT8) &&
            (function_name.contains("batch_matmul") ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

      LogicalResult matchAndRewrite(TF::PartitionedCallOp call_op,
                                    PatternRewriter& rewriter) const override {
        const auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
        // removeAttr will return nullptr if no attribute was removed.
        if (!call_op->removeAttr(kQuantTraitAttrName) || !f_attr) {
          return failure();
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/preprocess_op.cc

      }
    
      LogicalResult matchAndRewrite(TF::PartitionedCallOp op,
                                    PatternRewriter& rewriter) const override {
        const auto f_attr = mlir::dyn_cast<FlatSymbolRefAttr>(op.getFAttr());
        // Non-quantizable op
        if (!op->hasAttr(kQuantTraitAttrName)) return failure();
        StringRef function_name = f_attr.getValue();
        // TODO(b/228928859): Improve the getter function to match attributes rather
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h

    }
    
    // Returns the function attribute for the given call op which is lifted for
    // quantization.
    inline FlatSymbolRefAttr GetFuncAttr(TF::PartitionedCallOp call_op) {
      return mlir::dyn_cast<FlatSymbolRefAttr>(call_op.getFAttr());
    }
    
    inline FlatSymbolRefAttr GetFuncAttr(TF::XlaCallModuleOp call_op) {
      return call_op->getAttrOfType<FlatSymbolRefAttr>(
          TF::kStablehloEntryFunctionAttrName);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top