- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ExtractSingleElementAsFloat (0.81 sec)
-
tensorflow/compiler/mlir/lite/utils/attribute_utils.cc
#include "mlir/IR/BuiltinTypes.h" // from @llvm-project #include "mlir/Support/LLVM.h" // from @llvm-project namespace mlir { namespace TFL { FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr) { if (attr.getShapedType().getNumElements() != 1 || !mlir::isa<FloatType>(attr.getShapedType().getElementType())) { return {}; } return attr.getSplatValue<FloatAttr>(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 1.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/attribute_utils.h
} // Returns the single float element from an ElementsAttr. Returns empty // attribute if the number of elements in the attribute is not 1 or the // element isn't a float attribute. FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr); // Returns the single float element if the input is an ElementsAttr, or return // itself as a float element. Returns empty attribute if the number of elements
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Mar 03 16:37:16 UTC 2022 - 2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/optimize_patterns.td
CPred<"$_self.isa<ElementsAttr>() && $_self.cast<ElementsAttr>().getShapedType().getElementType().isa<FloatType>()">, "float constant tensor">; def ExtractSingleElementAsFloat : NativeCodeCall< "ExtractSingleElementAsFloat($_self.cast<ElementsAttr>())">; // Checks if the value has rank at most 'n'. class HasRankAtMost<int n> : Constraint< CPred<"$0.getType().cast<ShapedType>().hasRank() && "
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 16 20:31:41 UTC 2024 - 66.4K bytes - Viewed (0)