- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 68 for DenseIntElementsAttr (0.29 sec)
-
tensorflow/compiler/mlir/lite/flatbuffer_operator.cc
extendVec[i] = llvm::APInt(1, value[i]); } mlir::RankedTensorType ty = tensorflow::GetTypeFromTFTensorShape(shape, builder.getIntegerType(1)); return mlir::DenseIntElementsAttr::get(ty, extendVec); } static mlir::Attribute BuildRankedTensorAttr(std::vector<int64_t> shape, std::vector<int64_t> value,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 38K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc
} return dnums; } DenseIntElementsAttr ConvertToDenseElementsAttr(ArrayAttr array_attr, PatternRewriter &rewriter) { SmallVector<int64_t> array; array.reserve(array_attr.size()); for (auto elem : array_attr.getAsRange<IntegerAttr>()) { array.push_back(elem.getInt()); } return DenseIntElementsAttr::get(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 30.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc
converter.quantizeFloatToInt(floatAttr.getValue())); } return nullptr; } /// Converts a real expressed DenseFPElementsAttr to a corresponding /// DenseElementsAttr (typically DenseIntElementsAttr) containing quantized /// storage values assuming the given quantizedElementType and converter. static DenseElementsAttr convertDenseFPElementsAttr( DenseFPElementsAttr realFPElementsAttr,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_patterns.td
def CanBeTranslatedToDynamicSlice : Constraint<CPred< "CanBeTranslatedToDynamicSlice($0, $1, $2.cast<DenseIntElementsAttr>())">>; def TFSliceSizes2HLOSliceSizes : NativeCodeCall< "TFSliceSizes2HLOSliceSizes($0, $1, $2.cast<DenseIntElementsAttr>()," "&$_builder)">; def : Pat<(TF_SliceOp:$op MHLO_Tensor:$input, MHLO_Tensor:$starting_indices,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 06 18:46:23 UTC 2024 - 34.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/ir/tfl_ops.cc
// Begin has to be all 0s. DenseIntElementsAttr begin_dense_elem_attr; if (!matchPattern(getBegin(), m_Constant(&begin_dense_elem_attr))) { return {}; } for (auto begin_ele : begin_dense_elem_attr) { if (begin_ele.getSExtValue() != 0) { return {}; } } // Strides has to be all 1s. DenseIntElementsAttr strides_dense_elem_attr;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 02 09:41:17 UTC 2024 - 169.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/ir/tf_ops_tensor_helper.cc
auto ranked_ty = mlir::dyn_cast<RankedTensorType>(input_ty); if (!ranked_ty) return UnrankedTensorType::get(element_ty); int64_t rank = ranked_ty.getRank(); DenseIntElementsAttr indices; if (!matchPattern(reduction_indices, m_Constant(&indices))) { // Output type is unranked if reduction indices are not constant and reduced // dimensions are not kept.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/debug/debug_test.cc
builder.setInsertionPointToStart(func.addEntryBlock()); llvm::SmallVector<int> shape{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; builder.create<mlir::arith::ConstantOp>( builder.getUnknownLoc(), mlir::DenseIntElementsAttr::get( mlir::RankedTensorType::get(shape.size(), builder.getI32Type()), shape)); builder.create<mlir::func::ReturnOp>(builder.getUnknownLoc()); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 17 11:15:16 UTC 2024 - 9.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/tfl_stablehlo_pass.cc
value = builder->getDenseI64ArrayAttr(vec); } else { RankedTensorType ty = tensorflow::GetTypeFromTFTensorShape( shape, builder->getIntegerType(64)); value = DenseIntElementsAttr::get(ty, vec); } auto named_attr = builder->getNamedAttr(key, value); attrs.push_back(named_attr); break; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Jan 24 06:08:43 UTC 2024 - 10.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/layout_optimization.cc
Location loc = op->getLoc(); OpBuilder builder = OpBuilder::atBlockEnd(op->getBlock()); auto perm_attr = [&](Permutation permutation) -> DenseIntElementsAttr { auto perm_ty = RankedTensorType::get({4}, builder.getIntegerType(64)); return DenseIntElementsAttr::get(perm_ty, permutation); }; // Change operation data format. if (failed(layout_sensitive_interface.UpdateDataFormat(target_data_format)))
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 19.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc
/*window_dilations=*/ PermuteI64ArrayAttr(rewriter, op.getWindowDilations(), kNchwToNhwcPermutation), /*padding=*/DenseIntElementsAttr(nullptr)); // Clone the reduce body. It is not affected by the permutation. IRMapping mapping; op.getBody().cloneInto(&new_reduce_window_op.getBody(), mapping);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0)