- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 77 for getDefiningOp (0.16 sec)
-
tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc
return IsTransposeOpWithPermuation(lhs.getDefiningOp(), kNhwcToNchwPermutation); } // Pushes the transpose op at the input to the result. void rewrite(mlir::stablehlo::ReduceWindowOp op, PatternRewriter& rewriter) const override { auto transpose_op = cast<TransposeOp>(op.getOperand(0).getDefiningOp());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold_test.cc
auto mul_op = dyn_cast_or_null<TF::MulOp>(results[0].getDefiningOp()); EXPECT_THAT(mul_op, NotNull()); // Even though the preceding CastOp is foldable, it shouldn't be folded since // we are calling from the MulOp. EXPECT_TRUE(isa<TF::CastOp>(mul_op.getX().getDefiningOp())); } TEST_F(ConstantFoldingTest, NotFoldingArgument) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 04 07:19:09 UTC 2024 - 10.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc
queue.pop_back(); if (auto arg = mlir::dyn_cast_or_null<BlockArgument>(node)) { neighbors.push_back(arg.getArgNumber()); continue; } if (!node.getDefiningOp()) continue; for (Value operand : node.getDefiningOp()->getOperands()) { if (visited.contains(operand)) continue; queue.push_back(operand); visited.insert(operand); } } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc
} template <typename Op, typename ElementType = Type, typename ValType, typename Convert> static Attribute BinaryFolder(Op *op) { auto lhs_op = op->getLhs().template getDefiningOp<mhlo::ConstantOp>(); auto rhs_op = op->getRhs().template getDefiningOp<mhlo::ConstantOp>(); if (!lhs_op || !lhs_op) return {}; auto lhs = dyn_cast_or_null<DenseElementsAttr>(lhs_op.getValue());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc
if (block_arg_num.has_value()) return block_arg_num; Value next_input = input; auto pad_op = dyn_cast_or_null<TF::PadOp>(next_input.getDefiningOp()); auto cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp()); while (pad_op || cast_op) { if (pad_op) { auto block_arg_num = GetBlockArgNum(pad_op.getInput()); if (block_arg_num.has_value()) return block_arg_num;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 29.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
auto& tensor_property = enumerated_inputs.second; Value input = op.getOperand(index); if (input.getDefiningOp() == nullptr) continue; // TODO(b/172517537): make this work with non-PTQ case. if (llvm::isa<func::ConstantOp, arith::ConstantOp, TFL::ConstOp>( input.getDefiningOp())) { // Tensors with derived scale are biases, and handled in propagation.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc
if (any_blargs) { return failure(); } auto tpose_arg1 = llvm::dyn_cast_or_null<TFL::TransposeOp>( op->getOperand(0).getDefiningOp()); auto tpose_arg2 = llvm::dyn_cast_or_null<TFL::TransposeOp>( op->getOperand(1).getDefiningOp()); if (!tpose_arg1 || !tpose_arg2) { return failure(); } auto tpose_arg1_type =
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/hlo_matchers.cc
auto iota_broadcast = dyn_cast_or_null<mhlo::BroadcastInDimOp>(iota.getDefiningOp()); if (!iota_broadcast || iota_broadcast.getBroadcastDimensions() != dimensions) return false; if (!isa_and_nonnull<mhlo::IotaOp>( iota_broadcast.getOperand().getDefiningOp())) return false; return true; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc
PatternRewriter &rewriter) { auto dot = dyn_cast_or_null<mhlo::DotGeneralOp>( reshape_after.getOperand().getDefiningOp()); if (!dot) return failure(); auto reshape_before = dyn_cast_or_null<mhlo::ReshapeOp>(dot.getLhs().getDefiningOp()); if (!reshape_before) return failure(); if (!dot.getLhs().getType().hasStaticShape() || !dot.getRhs().getType().hasStaticShape() ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 26.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/replace_cast_hacks_with_tf_xla_ops.cc
Operation *op_input = args[0].getDefiningOp(); Operation *op_weight = args[1].getDefiningOp(); if (isa<TF::SubOp>(op_input)) { op_input = op_input->getOperand(0).getDefiningOp(); } if (isa<TF::SubOp>(op_weight)) { op_weight = op_weight->getOperand(0).getDefiningOp(); } if (isa<TF::CastOp>(op_input)) { op_input = op_input->getOperand(0).getDefiningOp();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 47.1K bytes - Viewed (0)