Home
last modified time | relevance | path

Searched refs:CastOp (Results 1 – 25 of 86) sorted by relevance

1234

/external/llvm-project/llvm/lib/Target/NVPTX/
DNVPTXTargetTransformInfo.cpp143 Optional<Instruction::CastOps> CastOp; in simplifyNvvmIntrinsic() member
156 SimplifyAction(Instruction::CastOps CastOp) : CastOp(CastOp) {} in simplifyNvvmIntrinsic()
345 if (Action.CastOp) in simplifyNvvmIntrinsic()
346 return CastInst::Create(*Action.CastOp, II->getArgOperand(0), II->getType(), in simplifyNvvmIntrinsic()
/external/tflite-support/tensorflow_lite_support/java/src/java/org/tensorflow/lite/support/common/ops/
DCastOp.java24 public class CastOp implements TensorOperator { class
41 public CastOp(DataType destinationType) { in CastOp() method in CastOp
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/
Dtfr_ops.cc381 new_cst = rewriter.create<CastOp>(loc, out_type, new_cst->getResult(0)); in matchAndRewrite()
392 new_cst = rewriter.create<CastOp>(loc, out_type, new_cst->getResult(0)); in matchAndRewrite()
401 struct RemoveRedundantCast : public OpRewritePattern<CastOp> {
402 using OpRewritePattern<CastOp>::OpRewritePattern;
404 LogicalResult matchAndRewrite(CastOp cast_op, in matchAndRewrite()
407 llvm::dyn_cast_or_null<CastOp>(cast_op.arg().getDefiningOp()); in matchAndRewrite()
442 if (auto cast_op = llvm::dyn_cast_or_null<CastOp>(preceding_op)) { in matchAndRewrite()
519 void CastOp::getCanonicalizationPatterns(OwningRewritePatternList &results, in getCanonicalizationPatterns()
/external/tensorflow/tensorflow/compiler/mlir/tfr/passes/
Draise_to_tf.cc126 CastOp cast_op, Type input_tfr_type) const { in CastToNonDerivedType()
152 return rewriter.create<TF::CastOp>(loc, result_type, cast_op.arg()); in CastToNonDerivedType()
171 rewriter.create<TF::CastOp>(loc, result_type, input_values[i]); in CastValuesToSameType()
251 if (auto cast_op = dyn_cast_or_null<CastOp>(input_op)) { in CollectInputsAndAttributes()
273 auto cast_op = dyn_cast_or_null<CastOp>(list_input.getDefiningOp()); in CollectInputsAndAttributes()
386 auto casted = rewriter.create<CastOp>(loc, res_type, new_res); in CreateAndReplaceOp()
393 rewriter.create<CastOp>(loc, unconstrainted_type, new_res); in CreateAndReplaceOp()
Ddecompose.cc159 auto casted = builder.create<CastOp>(op->getLoc(), tensor_type, in RewriteUnregisteredTFOps()
165 auto casted = builder.create<CastOp>( in RewriteUnregisteredTFOps()
221 auto casted = builder.create<CastOp>( in RewriteUnregisteredTFOps()
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dcast_op.cc34 class CastOp : public XlaOpKernel { class
36 explicit CastOp(OpKernelConstruction* ctx) : XlaOpKernel(ctx) { in CastOp() function in tensorflow::__anon9e9e9e060111::CastOp
100 TF_DISALLOW_COPY_AND_ASSIGN(CastOp);
103 REGISTER_XLA_OP(Name("Cast"), CastOp);
/external/llvm/unittests/Analysis/
DValueTrackingTest.cpp55 Instruction::CastOps CastOp; in expectPattern() local
56 SelectPatternResult R = matchSelectPattern(A, LHS, RHS, &CastOp); in expectPattern()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Ddecompose_resource_ops.cc92 CastOp::getOperationName(), in DecomposeRngReadAndSkipOp()
179 Value word_u64 = rewriter.create<CastOp>(loc, word_u64_type, word); in matchAndRewrite()
181 Value new_word = rewriter.create<CastOp>(loc, word_type, new_word_u64); in matchAndRewrite()
Dlower_tf.cc525 CastOp::getOperationName(), in LowerLgammaOp()
568 input = rewriter.create<CastOp>(loc, tensor_type, input); in matchAndRewrite()
715 result = rewriter.create<CastOp>(loc, original_tensor_type, result); in matchAndRewrite()
805 CastOp::getOperationName(), in LowerSpaceToBatchNDOp()
849 rewriter.create<CastOp>(loc, block_shape_i64_type, op.block_shape()); in matchAndRewrite()
854 rewriter.create<CastOp>(loc, paddings_i64_type, op.paddings()); in matchAndRewrite()
1198 {CastOp::getOperationName(), MatMulOp::getOperationName()}, 1, in LowerSparseMatMulOp()
1227 operand = rewriter.create<CastOp>(op.getLoc(), tensor_type_f32, operand); in matchAndRewrite()
1364 input_shape = rewriter.create<CastOp>( in matchAndRewrite()
1398 auto in_y_f32 = rewriter.create<CastOp>( in matchAndRewrite()
[all …]
Dfunctional_control_flow_to_cfg.cc67 builder->create<TF::CastOp>(loc, expected, val, in CallFn()
91 builder->create<TF::CastOp>(loc, expected, val, in PrepareValsForJump()
124 builder->create<TF::CastOp>(loc, result.getType(), arg, in ReplaceOpResultWithBlockArgs()
Dtpu_space_to_depth_pass.cc129 LogicalResult HandleCast(TF::CastOp cast_op, ArrayRef<int64_t> new_shape) { in HandleCast()
136 auto cast_op_input = dyn_cast_or_null<TF::CastOp>(cast_input.getDefiningOp()); in HandleCast()
151 cast_op_input = dyn_cast_or_null<TF::CastOp>(cast_input.getDefiningOp()); in HandleCast()
184 if (auto cast_op = dyn_cast_or_null<TF::CastOp>(input.getDefiningOp())) in HandlePad()
550 auto cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp()); in GetInputBlockArgNum()
563 cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp()); in GetInputBlockArgNum()
Dtf_data_optimization.cc40 auto num_parallel_calls_op = rewriter.create<CastOp>( in matchAndRewrite()
Dregion_control_flow_to_functional.cc202 CastOp cast = dyn_cast<CastOp>(*it); in IsSingleCallRegion()
224 llvm::dyn_cast_or_null<CastOp>(value.getDefiningOp())) { in MatchCallArgs()
Dtpu_host_computation_expansion.cc55 return llvm::isa<TF::CastOp, TF::IdentityOp>(op); in IsTrivialUnaryOperation()
Dtpu_sharding_identification_pass.cc94 if (llvm::isa<TF::IdentityOp, TF::CastOp, TF::ReadVariableOp>(owner)) { in GetXlaShardingFromArg()
225 if (llvm::isa_and_nonnull<TF::IdentityOp, TF::CastOp>(def)) { in GetXlaShardingFromRetval()
/external/llvm-project/mlir/utils/spirv/
Ddefine_inst.sh26 …Op | ArithmeticBinaryOp | ArithmeticUnaryOp | LogicalBinaryOp | LogicalUnaryOp | CastOp | ControlF…
/external/llvm-project/llvm/lib/Transforms/Scalar/
DFloat2Int.cpp209 auto CastOp = (Instruction::CastOps)I->getOpcode(); in walkBackwards() local
210 seen(I, validateRange(Input.castOp(CastOp, MaxIntegerBW+1))); in walkBackwards()
284 auto CastOp = (Instruction::CastOps)I->getOpcode(); in walkForwards() local
285 return Ops[0].castOp(CastOp, MaxIntegerBW+1); in walkForwards()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DFloat2Int.cpp210 auto CastOp = (Instruction::CastOps)I->getOpcode(); in walkBackwards() local
211 seen(I, validateRange(Input.castOp(CastOp, MaxIntegerBW+1))); in walkBackwards()
285 auto CastOp = (Instruction::CastOps)I->getOpcode(); in walkForwards() local
286 return Ops[0].castOp(CastOp, MaxIntegerBW+1); in walkForwards()
/external/llvm-project/mlir/examples/toy/Ch6/mlir/
DToyCombine.cpp27 OpFoldResult CastOp::fold(ArrayRef<Attribute> operands) { in fold()
DDialect.cpp74 return builder.create<CastOp>(conversionLoc, resultType, input); in materializeCallConversion()
233 void CastOp::inferShapes() { getResult().setType(getOperand().getType()); } in inferShapes()
/external/llvm-project/mlir/examples/toy/Ch5/mlir/
DToyCombine.cpp27 OpFoldResult CastOp::fold(ArrayRef<Attribute> operands) { in fold()
/external/llvm-project/mlir/examples/toy/Ch4/mlir/
DToyCombine.cpp27 OpFoldResult CastOp::fold(ArrayRef<Attribute> operands) { in fold()
/external/llvm-project/llvm/lib/Target/AMDGPU/
DAMDGPUCodeGenPrepare.cpp598 CastInst *CastOp; in foldBinOpIntoSelect() local
602 SelectInst *Sel = findSelectThroughCast(BO.getOperand(0), CastOp); in foldBinOpIntoSelect()
605 Sel = findSelectThroughCast(BO.getOperand(1), CastOp); in foldBinOpIntoSelect()
617 if (CastOp) { in foldBinOpIntoSelect()
618 if (!CastOp->hasOneUse()) in foldBinOpIntoSelect()
620 CT = ConstantFoldCastOperand(CastOp->getOpcode(), CT, BO.getType(), *DL); in foldBinOpIntoSelect()
621 CF = ConstantFoldCastOperand(CastOp->getOpcode(), CF, BO.getType(), *DL); in foldBinOpIntoSelect()
648 if (CastOp) in foldBinOpIntoSelect()
649 CastOp->eraseFromParent(); in foldBinOpIntoSelect()
/external/llvm-project/mlir/examples/toy/Ch7/mlir/
DToyCombine.cpp27 OpFoldResult CastOp::fold(ArrayRef<Attribute> operands) { in fold()
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/utils/
Dbroadcast_utils.cc70 return builder.createOrFold<tensor::CastOp>( in ComputeBinaryElementwiseBroadcastingResultExtents()

1234