Home
last modified time | relevance | path

Searched refs:tf_op (Results 1 – 20 of 20) sorted by relevance

/external/tensorflow/tensorflow/core/profiler/utils/
Dtf_op_utils_test.cc27 TfOp tf_op = ParseTfOpFullname(kName); in TEST() local
28 EXPECT_EQ(tf_op.category, Category::kTensorFlow); in TEST()
29 EXPECT_EQ(tf_op.name, "OpName"); in TEST()
30 EXPECT_EQ(tf_op.type, "OpType"); in TEST()
36 TfOp tf_op = ParseTfOpFullname(kName); in TEST() local
37 EXPECT_EQ(tf_op.category, Category::kTensorFlow); in TEST()
38 EXPECT_EQ(tf_op.name, "OpName"); in TEST()
39 EXPECT_EQ(tf_op.type, "_InternalOpType"); in TEST()
45 TfOp tf_op = ParseTfOpFullname(kName); in TEST() local
46 EXPECT_EQ(tf_op.category, Category::kTensorFlow); in TEST()
[all …]
Dtf_op_utils.cc69 TfOp tf_op = {Category::kUnknown, tf_op_fullname, kUnknownOp}; in ParseTfOpFullname() local
75 tf_op.category = Category::kMemcpyHToD; in ParseTfOpFullname()
76 tf_op.type = kMemcpyHToDOp; in ParseTfOpFullname()
78 tf_op.category = Category::kMemcpyDToH; in ParseTfOpFullname()
79 tf_op.type = kMemcpyDToHOp; in ParseTfOpFullname()
86 tf_op.category = Category::kTfData; in ParseTfOpFullname()
87 tf_op.type = kDatasetOp; in ParseTfOpFullname()
89 tf_op = {Category::kTensorFlow, parts[0], parts[1]}; in ParseTfOpFullname()
91 tf_op = {Category::kJax, parts[0], parts[1]}; in ParseTfOpFullname()
93 tf_op.name = parts[0]; // remove trailing ':' in ParseTfOpFullname()
[all …]
Dcost_utils.cc89 TfOp tf_op; in Predict() local
96 tf_op = ParseTfOpFullname(stat.StrOrRefValue()); in Predict()
105 if (tf_op.type.empty() || tensor_shapes.empty()) { in Predict()
110 op_context.name = std::string(tf_op.type); in Predict()
116 if (costs.inaccurate) unsupported_ops_.insert(std::string(tf_op.type)); in Predict()
118 VLOG(1) << tf_op.type << tensor_shapes in Predict()
Dtf_op_utils.h53 std::vector<absl::string_view> ParseTfNameScopes(const TfOp& tf_op);
57 std::string TfOpEventName(const TfOp& tf_op);
70 inline bool IsDatasetOp(const TfOp& tf_op) { in IsDatasetOp() argument
71 return tf_op.category == Category::kTfData; in IsDatasetOp()
Dop_metrics_db_utils.cc118 TfOp tf_op = ParseTfOpFullname(device_op_metrics.provenance()); in CreateTfMetricsDbFromDeviceOpMetricsDb() local
119 builder.UpdateTfOpMetricsWithDeviceOpMetrics(tf_op.name, tf_op.type, in CreateTfMetricsDbFromDeviceOpMetricsDb()
Dderived_timeline.cc74 TfOp tf_op = ParseTfOpFullname(tf_op_full_name); in ProcessTfOpEvent() local
75 Category category = tf_op.category; in ProcessTfOpEvent()
78 for (const auto& tf_name_scope : ParseTfNameScopes(tf_op)) { in ProcessTfOpEvent()
89 tf_op_event_metadata->set_display_name(TfOpEventName(tf_op)); in ProcessTfOpEvent()
/external/tensorflow/tensorflow/core/kernels/mlir_generated/
Dbase_cpu_op.h23 #define GENERATE_AND_REGISTER_UNARY_CPU_KERNEL(tf_op, input_type) \ argument
24 GENERATE_AND_REGISTER_UNARY_KERNEL(tf_op, CPU, input_type)
26 #define GENERATE_UNARY_CPU_KERNEL(tf_op, input_type) \ argument
27 GENERATE_UNARY_KERNEL(tf_op, CPU, input_type)
29 #define GENERATE_UNARY_CPU_KERNEL2(tf_op, input_type, output_type) \ argument
30 GENERATE_UNARY_KERNEL2(tf_op, CPU, input_type, output_type)
32 #define REGISTER_ALIASED_CPU_KERNEL(tf_op, mlir_op, input_type, output_type) \ argument
33 REGISTER_ALIASED_KERNEL(tf_op, mlir_op, CPU, input_type, output_type)
35 #define REGISTER_CPU_KERNEL(tf_op, input_type, output_type) \ argument
36 REGISTER_KERNEL(tf_op, CPU, input_type, output_type)
[all …]
Dbase_gpu_op.h23 #define GENERATE_AND_REGISTER_UNARY_GPU_KERNEL(tf_op, input_type) \ argument
24 GENERATE_AND_REGISTER_UNARY_KERNEL(tf_op, GPU, input_type)
26 #define GENERATE_UNARY_GPU_KERNEL(tf_op, input_type) \ argument
27 GENERATE_UNARY_KERNEL(tf_op, GPU, input_type)
29 #define GENERATE_UNARY_GPU_KERNEL2(tf_op, input_type, output_type) \ argument
30 GENERATE_UNARY_KERNEL2(tf_op, GPU, input_type, output_type)
32 #define REGISTER_ALIASED_GPU_KERNEL(tf_op, mlir_op, input_type, output_type) \ argument
33 REGISTER_ALIASED_KERNEL(tf_op, mlir_op, GPU, input_type, output_type)
35 #define REGISTER_GPU_KERNEL(tf_op, input_type, output_type) \ argument
36 REGISTER_KERNEL(tf_op, GPU, input_type, output_type)
[all …]
Dbase_op.h146 #define MLIR_FUNCTION(tf_op, platform, input_type, output_type) \ argument
147 _mlir_ciface_##tf_op##_##platform##_##input_type##_##output_type
149 #define MLIR_OP(tf_op, platform, input_type, output_type) \ argument
150 Mlir##tf_op##platform##input_type##output_type##Op
152 #define REGISTER_ALIASED_KERNEL(tf_op, mlir_op, platform, input_type, \ argument
155 Name(#tf_op) \
160 #define REGISTER_KERNEL(tf_op, platform, input_type, output_type) \ argument
161 REGISTER_ALIASED_KERNEL(tf_op, tf_op, platform, input_type, output_type)
163 #define REGISTER_COMPLEX_KERNEL(tf_op, platform, input_type, output_type) \ argument
165 Name(#tf_op) \
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/tensorflow/
Dtf_to_quant.cc76 LogicalResult matchAndRewrite(TFFakeQuantOp tf_op, in matchAndRewrite()
79 auto res = tf_op.outputs(); in matchAndRewrite()
86 Value min = tf_op.min(), max = tf_op.max(); in matchAndRewrite()
90 min = tf_op.min(); in matchAndRewrite()
95 max = tf_op.max(); in matchAndRewrite()
109 rewriter.setInsertionPointAfter(tf_op.getOperation()); in matchAndRewrite()
110 IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.num_bits()); in matchAndRewrite()
111 BoolAttr narrow_range = rewriter.getBoolAttr(tf_op.narrow_range()); in matchAndRewrite()
112 Type res_type = tf_op.getType(); in matchAndRewrite()
121 Value value = tf_op.outputs(); in matchAndRewrite()
[all …]
/external/tensorflow/tensorflow/core/profiler/convert/
Dxplane_to_op_metrics_db.cc60 TfOp tf_op; member
91 << " name=" << activity.tf_op.name in ProcessOneTfActivity()
92 << " type=" << activity.tf_op.type; in ProcessOneTfActivity()
98 activity.tf_op.name, activity.tf_op.type, activity.is_eager, in ProcessOneTfActivity()
104 if (IsInfeedEnqueueOp(activity.tf_op.type)) { in ProcessOneTfActivity()
147 const TfOp* tf_op = gtl::FindOrNull(tf_ops, event.Id()); in CollectTfActivities() local
148 if (tf_op != nullptr) { in CollectTfActivities()
157 {span.begin_ps(), tf_op_id, kTfOpBegin, *tf_op, is_eager}); in CollectTfActivities()
159 {span.end_ps(), tf_op_id, kTfOpEnd, *tf_op, is_eager}); in CollectTfActivities()
175 TfOp tf_op = ParseTfOpFullname(metadata.name()); in CollectTfOpsFromHostThreadsXPlane() local
[all …]
Dxplane_to_kernel_stats_db.cc77 tensorflow::profiler::TfOp tf_op = ParseTfOpFullname(tf_op_fullname); in ConvertDeviceTraceXPlaneToKernelReports() local
80 kernel.set_op_name(tf_op.name.data(), tf_op.name.size()); in ConvertDeviceTraceXPlaneToKernelReports()
/external/tensorflow/tensorflow/python/kernel_tests/
Dsegment_reduction_ops_test.py121 for np_op1, np_op2, tf_op in curr_ops_list:
123 s = tf_op(data=tf_x, segment_ids=indices)
244 for tf_op in [
250 s = tf_op(data=tf_x, segment_ids=indices)
311 for np_op1, np_op2, tf_op, init_op in ops_list:
322 s = tf_op(tf_x, segment_ids=indices, num_segments=num_segments)
362 for _, _, tf_op, _ in ops_list:
364 s = tf_op(tf_x, indices, num_segments)
386 for _, _, tf_op, _ in ops_list:
390 return tf_op(x, indices, num_segments)
[all …]
Dsparse_ops_test.py752 tf_op = sparse_ops.sparse_reduce_sum
755 tf_op = sparse_ops.sparse_reduce_max
771 tf_ans = tf_op(sp_t, reduction_axes, keep_dims)
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dprepare_tf.cc113 bool operator()(TFFakeQuantOp tf_op, AttrType &min_value, in operator ()()
115 Value min = tf_op.min(), max = tf_op.max(); in operator ()()
136 bool operator()(TFFakeQuantOp tf_op, AttrType &min_value, in operator ()()
138 min_value = tf_op.minAttr(); in operator ()()
139 max_value = tf_op.maxAttr(); in operator ()()
202 LogicalResult matchAndRewrite(TFFakeQuantOp tf_op, in matchAndRewrite()
205 auto res = tf_op.outputs(); in matchAndRewrite()
215 if (!fetchMinMax(tf_op, min_value, max_value)) { in matchAndRewrite()
226 rewriter.setInsertionPointAfter(tf_op.getOperation()); in matchAndRewrite()
227 IntegerAttr num_bits = rewriter.getI64IntegerAttr(tf_op.num_bits()); in matchAndRewrite()
[all …]
Dlegalize_tf.cc132 #define DECL_CONVERT_OP(tf_op) \ argument
133 struct ConvertTF##tf_op##Op : public RewritePattern { \
134 explicit ConvertTF##tf_op##Op(MLIRContext* context) \
135 : RewritePattern(TF::tf_op##Op::getOperationName(), 1, context) {} \
346 auto tf_op = cast<TF::Conv3DOp>(op); in matchAndRewrite() local
373 op, tf_op.getType(), tf_op.input(), tf_op.filter(), in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tfr/integration/
Dtfr_decompose_ctx.cc167 mlir::Operation* tf_op = op_builder.createOperation(op_state); in ExpandNode() local
168 op_builder.create<mlir::ReturnOp>(loc, tf_op->getResults()); in ExpandNode()
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_tf.cc50 #define DECL_CONVERT_OP(tf_op) \ argument
51 struct ConvertTF##tf_op##Op : public RewritePattern { \
52 explicit ConvertTF##tf_op##Op(MLIRContext* context) \
53 : RewritePattern(TF::tf_op##Op::getOperationName(), 1, context) {} \
/external/tensorflow/tensorflow/python/tpu/
Dtensor_tracer.py778 def _compute_signature(tensor, tf_op, cast_to_f32=True): argument
781 output_tensor = tf_op(tensor)
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/
DBUILD162 # We only shard tf_op on name for build performance reasons.