Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for get_attr (0.77 sec)

  1. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_a_m.cc

      if (!result_ty || !result_ty.hasStaticShape()) return {};
    
      if (result_ty == input.getType()) return input;
    
      DenseIntElementsAttr cst_attr;
      if (!matchPattern(input, m_Constant(&cst_attr))) return {};
      if (!cst_attr.isSplat()) return {};
    
      return DenseElementsAttr::get(result_ty, cst_attr.getSplatValue<Attribute>());
    }
    
    //===----------------------------------------------------------------------===//
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 146.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/tf_ops_n_z.cc

        for (const auto &entry : llvm::enumerate(indices.getValue())) {
          auto int_attr = entry.value().cast<IntegerAttr>();
          if (int_attr.getInt() < min)
            return op.emitOpError()
                   << "requires '" << name << "' to contain values of at least "
                   << min << ", but got " << int_attr.getInt() << " at index "
                   << entry.index();
        }
    
        return success();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 09 22:07:10 UTC 2024
    - 170.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize.cc

        return FloatValueEquals(value, raw_value);
      } else if (mlir::isa<IntegerType>(element_type)) {
        auto int_attr = mlir::dyn_cast_or_null<DenseIntElementsAttr>(value);
        if (!int_attr) return false;
    
        if (int_attr.isSplat()) {
          return int_attr.getSplatValue<APInt>() == raw_value;
        }
        return llvm::all_of(int_attr.getValues<APInt>(),
                            [raw_value](const APInt &f) { return f == raw_value; });
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  4. 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)
  5. staging/src/k8s.io/apiserver/pkg/registry/generic/registry/store_test.go

    	}
    	return storage.SelectionPredicate{
    		Label:    labels.Everything().Add(*l),
    		Field:    fields.Everything(),
    		GetAttrs: getPodAttrs,
    	}
    }
    
    func matchEverything() storage.SelectionPredicate {
    	return storage.SelectionPredicate{
    		Label: labels.Everything(),
    		Field: fields.Everything(),
    		GetAttrs: func(obj runtime.Object) (label labels.Set, field fields.Set, err error) {
    			return nil, nil, nil
    		},
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 10:12:02 UTC 2024
    - 101.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

        // folding), but we can still derive the shape of a constant tensor for
        // its attribute type.
        auto tensor_attr = mlir::cast<mlir::TypedAttr>(inst->getAttr("value"));
        llvm::ArrayRef<int64_t> shape_ref =
            mlir::cast<TensorType>(tensor_attr.getType()).getShape();
        if (mlir::failed(check_shape(shape_ref))) return std::nullopt;
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  7. pkg/registry/batch/job/strategy_test.go

    	}
    	for name, tc := range cases {
    		t.Run(name, func(t *testing.T) {
    			if tc.job == nil {
    				_, _, err := GetAttrs(tc.nonJobObject)
    				if diff := cmp.Diff(tc.wantErr, err.Error()); diff != "" {
    					t.Errorf("Unexpected errors (-want,+got):\n%s", diff)
    				}
    			} else {
    				gotLabels, _, err := GetAttrs(tc.job)
    				if err != nil {
    					t.Errorf("Error %s supposed to be nil", err.Error())
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 101.5K bytes
    - Viewed (0)
  8. fastapi/routing.py

                    "/"
                ), "A path prefix must not end with '/', as the routes will start with '/'"
            else:
                for r in router.routes:
                    path = getattr(r, "path")  # noqa: B009
                    name = getattr(r, "name", "unknown")
                    if path is not None and not path:
                        raise FastAPIError(
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 02:48:51 UTC 2024
    - 170.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/translate/import_model.cc

      // construction.
      llvm::SmallVector<mlir::NamedAttrList, 4> arg_attrs;
      arg_attrs.resize(func.getNumArguments());
      llvm::SmallVector<mlir::NamedAttrList, 4> ret_attrs;
      ret_attrs.resize(func.getNumResults());
    
      auto set_attributes_on_func = [&](Node* node, int64_t index, bool is_arg) {
        for (const auto& node_attr : node->attrs()) {
          const auto& key = node_attr.first;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 183.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          auto name = attr.getName();
          return name == "call_target_name" || name == "backend_config" ||
                 name == "api_version" || name == "called_computations";
        };
        for (const auto& attr : op->getAttrs()) {
          if (!is_supported_attr_name(attr)) {
            return op.emitOpError()
                   << attr.getName().getValue()
                   << " is not a supported attribute for ApproxTopK";
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
Back to top