Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 55 for get_attr (0.22 sec)

  1. tensorflow/compiler/mlir/quantization/tensorflow/python/save_model.py

        graph = ops.get_default_graph()
        for op in graph.get_operations():
          if op.type == '_Retval':
            expected_node_name = op.name
            if op.get_attr('tf_saved_model.index_path') is not None:
              index_path_name = op.get_attr('tf_saved_model.index_path')[0]
              index_path_name = index_path_name.decode('utf-8').split(':')[0]
              try:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 01:09:50 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

          return false;
        }
        // FusedMatMul kernel does not support grad_a/grad_b attrs
        if ((matmul->hasAttr("grad_a") &&
             mlir::cast<BoolAttr>(matmul->getAttr("grad_a")).getValue()) ||
            (matmul->hasAttr("grad_b") &&
             mlir::cast<BoolAttr>(matmul->getAttr("grad_b")).getValue())) {
          (void)rewriter.notifyMatchFailure(matmul, [&](Diagnostic &diag) {
            diag << "FusedMatMul kernel does not support grad_a/grad_b attrs";
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_saved_model.cc

      // Check that there are no duplicated exported_names.
      DenseMap<StringRef, Operation *> exported_name_to_op;
      for (auto &op : module) {
        auto attr = op.getAttr(exported_names_ident);
        if (!attr) continue;
        // If this verifier is called before we verify the
        // 'tf_saved_model.exported_names' attribute, then it might be invalid.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 23.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tfg-to-tfe.cc

            graph_func.getLoc(),
            graph_func->getAttrOfType<StringAttr>(SymbolTable::getSymbolAttrName())
                .getValue(),
            ftype);
    
        func->setAttrs(graph_func->getAttrs());
    
        llvm::SmallVector<Type> arg_types;
        llvm::SmallVector<Type> res_types;
        llvm::SmallVector<DictionaryAttr> arg_attrs;
        llvm::SmallVector<DictionaryAttr> res_attrs;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

        if (auto float_attr = mlir::dyn_cast_or_null<FloatAttr>(attr.second)) {
          fbb.Float(attr.first.data(), float_attr.getValue().convertToFloat());
        } else if (auto int_attr =
                       mlir::dyn_cast_or_null<IntegerAttr>(attr.second)) {
          fbb.Int(attr.first.data(), int_attr.getInt());
        } else if (auto bool_attr = mlir::dyn_cast_or_null<BoolAttr>(attr.second)) {
          fbb.Bool(attr.first.data(), bool_attr.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/jit/kernels/xla_ops.cc

                            ctx->GetAttr("Tconstants", &constant_types));
      std::vector<int> constants(constant_types.size());
      std::iota(constants.begin(), constants.end(), 0);
      return constants;
    }
    
    std::vector<int> ResourcesVector(OpKernelConstruction* ctx) {
      DataTypeVector constant_types;
      OP_REQUIRES_OK_RETURN(ctx, std::vector<int>(),
                            ctx->GetAttr("Tconstants", &constant_types));
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 22:46:36 UTC 2024
    - 41.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/utils/tf_to_uniform_attribute_utils.cc

      auto* defining_op = op->getOperand(operand_index).getDefiningOp();
      for (auto attr : kQuantizationAxisAttrs) {
        if (defining_op->hasAttr(attr)) {
          return defining_op->getAttr(attr);
        }
      }
      // Not found.
      return rewriter.getI64IntegerAttr(-1);
    }
    
    LogicalResult CheckIfAttrIs8Bit(const std::string& attr, Operation* op,
                                    bool& is_8_bit) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  8. tensorflow/c/kernels.cc

        cc_type v;                                                                 \
        auto* cc_ctx = reinterpret_cast<::tensorflow::OpKernelConstruction*>(ctx); \
        absl::Status s = cc_ctx->GetAttr(attr_name, &v);                           \
        ::tensorflow::Set_TF_Status_from_Status(status, s);                        \
        if (s.ok()) {                                                              \
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 22:53:47 UTC 2024
    - 36K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

                                FuncAttr attr) {
      func.eraseBody();
      func.addEntryBlock();
      func->setAttr(kTFImplements, attr);
      OpBuilder builder(func.getBody());
      std::string custom_option_buffer;
      if (failed(CreateNgramsCustomOption(func, attr.getAttrs(),
                                          custom_option_buffer))) {
        return failure();
      }
      auto op = builder.create<CustomOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

                 << ")";
        }
      }
      return success();
    }
    
    void GraphOp::print(OpAsmPrinter &p) {
      p << ' ';
      p.printRegion(getOperation()->getRegion(0));
      p.printOptionalAttrDict(getOperation()->getAttrs());
    }
    
    ParseResult GraphOp::parse(OpAsmParser &parser, OperationState &result) {
      llvm::SMLoc loc = parser.getCurrentLocation();
    
      // Parse the body region.
      Region &body = *result.addRegion();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
Back to top