- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 69 for ConstantOp (0.22 sec)
-
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc
auto one_cst = rewriter.create<stablehlo::ConstantOp>(rewriter.getUnknownLoc(), one_val); auto half_val = DenseElementsAttr::get(type, kHalf); auto half_cst = rewriter.create<stablehlo::ConstantOp>(one_cst.getLoc(), half_val); auto one_over_root2_val = DenseElementsAttr::get(type, kOneOverRoot2); auto one_over_root2_cst = rewriter.create<stablehlo::ConstantOp>( half_cst.getLoc(), one_over_root2_val);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 9.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/xla_legalize_targets_test.cc
auto const_int = builder_.create<chlo::ConstantOp>( builder_.getUnknownLoc(), builder_.getI32TensorAttr({42})); ConversionTarget target = GetDefaultLegalConversionTargets(context_, /*legalize_chlo=*/true); EXPECT_TRUE(target.isIllegal(const_int)); } TEST_F(XlaLegalizeTargetsTest, DontAllowCHLODialect) { auto const_int = builder_.create<chlo::ConstantOp>(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 03 05:56:39 UTC 2023 - 3.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/fold_constant_transpose.cc
LogicalResult match(mlir::stablehlo::TransposeOp op) const override { Value operand = op.getOperand(); auto const_op = dyn_cast_or_null<mlir::stablehlo::ConstantOp>(operand.getDefiningOp()); if (!const_op) return failure(); // Only support float tensors. auto tensor_type = mlir::dyn_cast_or_null<TensorType>(const_op.getType());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/experimental/tac/common/utils.h
namespace TFL { namespace tac { // Returns true if 'op' is non const op. Returns false otherwise or if // 'op' is null. inline bool IsNonConstOp(Operation* op) { if (!op) return false; if (llvm::isa<arith::ConstantOp, mlir::func::ConstantOp>(op)) return false; if (op->hasTrait<OpTrait::ConstantLike>()) return false; if (llvm::isa<TFL::ConstOp, TFL::QConstOp>(op)) return false; return true; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/lite/tfl_to_std.cc
q.erase(); } else if (auto q = llvm::dyn_cast<ConstOp>(op)) { auto value = q.getValue(); auto type = q.getResult().getType(); if (arith::ConstantOp::isBuildableWith(value, type)) { auto c = b.create<arith::ConstantOp>(q.getLoc(), q.getValue()); q.getOutput().replaceAllUsesWith(c); q.erase(); } else if (TFL::NoValueOp::isBuildableWith(value, type)) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 22 02:50:01 UTC 2024 - 3.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/init_text_file_to_import_test_pass.cc
// Replace filename constant ops to use the temporary file. MLIRContext* context = &getContext(); for (func::FuncOp func : module.getOps<func::FuncOp>()) { llvm::SmallVector<arith::ConstantOp, 4> constant_ops( func.getOps<arith::ConstantOp>()); for (auto op : constant_ops) { ShapedType shaped_type = RankedTensorType::get({1}, StringType::get(context)); DenseStringElementsAttr attr;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Oct 04 09:19:38 UTC 2022 - 5.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc
llvm::isa<BlockArgument>(tpose_arg2.getPerm())) { return failure(); } auto perm1 = llvm::dyn_cast_or_null<arith::ConstantOp>( tpose_arg1.getPerm().getDefiningOp()); auto perm2 = llvm::dyn_cast_or_null<arith::ConstantOp>( tpose_arg2.getPerm().getDefiningOp()); if (!perm1 || !perm2) { return failure(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc
PopulateLegalizeHloToTFLitePatterns(&patterns, &context); ConversionTarget target(context); target.addLegalDialect<TFL::TensorFlowLiteDialect, mhlo::MhloDialect>(); target.addLegalOp<func::CallOp, func::ConstantOp, arith::ConstantOp>(); target.addDynamicallyLegalOp<mhlo::CustomCallOp>(IsCustomCallLegal); target.addDynamicallyLegalOp<mhlo::ReduceOp>(IsReduceOpLegal); // Converted MHLO ops should be marked illegal here.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/shlo_simplify.td
def CloneF32ElementsAttrWithOnes : NativeCodeCall<"DenseElementsAttr::get($0.getType().cast<ShapedType>(), (float)1.0)">; def NotConstant : Constraint< CPred<"$0.isa<BlockArgument>() || !llvm::isa<stablehlo::ConstantOp>($0.getDefiningOp())">, "Is not a constant.">; def : Pat<(StableHLO_DivOp $l, (StableHLO_ConstantOp:$divisor FloatElementsAttr<32>:$cst)), (StableHLO_MulOp $l, (StableHLO_DivOp
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 10 03:05:20 UTC 2024 - 1.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Nov 21 16:55:41 UTC 2023 - 38.2K bytes - Viewed (0)