Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 115 for get_attr (0.18 sec)

  1. fastapi/params.py

            self, dependency: Optional[Callable[..., Any]] = None, *, use_cache: bool = True
        ):
            self.dependency = dependency
            self.use_cache = use_cache
    
        def __repr__(self) -> str:
            attr = getattr(self.dependency, "__name__", type(self.dependency).__name__)
            cache = "" if self.use_cache else ", use_cache=False"
            return f"{self.__class__.__name__}({attr}{cache})"
    
    
    class Security(Depends):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

      // function name can be changed by those passes.
      call_op->setAttr(TF::kStablehloEntryFunctionAttrName,
                       FlatSymbolRefAttr::get(builder.getStringAttr(func_name)));
      // Store the custom attribute to restore the function name when loading it
      // back in the post calibration stage. As mentioned above, the above entry
      // function attribute is not reliable.
      call_op->setAttr(kOriginalStablehloEntryFunctionAttrName,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

      ElementsAttr attr;
      if (!matchPattern(value, m_Constant(&attr))) return {};
      if (attr.getNumElements() != 1) return {};
      IntegerAttr int_attr = *attr.getValues<IntegerAttr>().begin();
      return int_attr.getValue().getSExtValue();
    }
    
    // Returns a RankedTensorType which is similar to `input_type` but replaces the
    // dimension size of `dim` with `dim_size`.  For example,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

                            AttrValue* value) {
      TF_RETURN_IF_ERROR(ConvertAttribute(
          mlir::cast<mlir::FlatSymbolRefAttr>(attr.getName()), value));
      TF_RETURN_IF_ERROR(ConvertAttributes(attr.getAttrs().getValue(),
                                           /*attrs_to_ignore=*/{}, remove_ref_type,
                                           value->mutable_func()->mutable_attr()));
      return absl::OkStatus();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            }
    
            rewriter.setInsertionPoint(quantizing_op);
            Operation* float_op = rewriter.clone(*quantizing_op);
            quantizing_op->setAttr(kDebugModeOpQuantAttrName,
                                   rewriter.getUnitAttr());
            float_op->setAttr(kDebugModeOpFloatAttrName, rewriter.getUnitAttr());
            RewireFloatModelBackbone(quantizing_op, float_op);
            return success();
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

            encoding.getBounds()[i] == ShapedType::kDynamic) {
          return false;
        }
      }
      return true;
    }
    
    bool HasSymbolRefAttr(Operation* op) {
      for (const auto& attr : op->getAttrs()) {
        Attribute attr_value = attr.getValue();
        if (mlir::isa<SymbolRefAttr>(attr_value)) {
          return true;
        } else if (auto array_attr = mlir::dyn_cast<ArrayAttr>(attr_value)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  7. tensorflow/c/kernels_experimental.cc

                                                    TF_Status* status) {
      ::tensorflow::TensorShape shape;
      auto* cc_ctx = reinterpret_cast<::tensorflow::OpKernelConstruction*>(ctx);
      ::tensorflow::Status s = cc_ctx->GetAttr(attr_name, &shape);
      ::tensorflow::Set_TF_Status_from_Status(status, s);
      size_t rank = static_cast<size_t>(shape.dims());
    
      if (!status->status.ok()) return;
    
      if (num_dims != rank) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 23 06:12:29 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_pipelining.cc

          for (const auto& attr_name : attr_names) {
            if (!global_iter_id_op->hasAttr(attr_name)) continue;
            offset->setAttr(attr_name, global_iter_id_op->getAttr(attr_name));
            new_global_iter_id->setAttr(attr_name,
                                        global_iter_id_op->getAttr(attr_name));
          }
          // Make the next function to get inlined use a different offset.
          ++offset_value;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 92.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc

      }
      xla::ConvolutionDimensionNumbers dnums =
          ConvertConvolutionDimensionNumbers(dnums_input);
    
      SmallVector<NamedAttribute> converted_attrs;
      for (auto attr : op->getAttrs()) {
        if (attr.getName() == op.getFeatureGroupCountAttrName() ||
            attr.getName() == op.getBatchGroupCountAttrName()) {
          converted_attrs.push_back(attr);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 30.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_island_coarsening.cc

        assert(funcs_for_cluster != tpu_funcs.end());
        assert(!funcs_for_cluster->second.empty());
        if (funcs_for_cluster->second.size() == 1) return false;
        for (NamedAttribute attr : op->getAttrs()) {
          auto symbol_ref = mlir::dyn_cast<FlatSymbolRefAttr>(attr.getValue());
          if (!symbol_ref) continue;
          func::FuncOp callee =
              symbol_table.lookup<func::FuncOp>(symbol_ref.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top