Home
last modified time | relevance | path

Searched refs:test_fn (Results 1 – 25 of 71) sorted by relevance

123

/external/tensorflow/tensorflow/python/autograph/converters/
Dreturn_statements_test.py29 def assertTransformedEquivalent(self, test_fn, *inputs): argument
31 with self.converted(test_fn, return_statements, ns) as result:
32 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs))
36 def test_fn(x): function
39 self.assertTransformedEquivalent(test_fn, 2)
43 def test_fn(): function
49 self.assertTransformedEquivalent(test_fn)
53 def test_fn(): function
57 self.assertTransformedEquivalent(test_fn)
61 def test_fn(x): function
[all …]
Dcontinue_statements_test.py30 def assertTransformedEquivalent(self, test_fn, *inputs): argument
31 with self.converted(test_fn, continue_statements, {'ops': ops},
33 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs))
37 def test_fn(x): function
46 self.assertTransformedEquivalent(test_fn, 0)
47 self.assertTransformedEquivalent(test_fn, 1)
48 self.assertTransformedEquivalent(test_fn, 3)
49 self.assertTransformedEquivalent(test_fn, 4)
53 def test_fn(x): function
64 self.assertTransformedEquivalent(test_fn, 0)
[all …]
Dcontrol_flow_test.py47 def assertTransformedResult(self, test_fn, inputs, expected, symbols=None): argument
52 with self.converted(test_fn, control_flow, symbols,
54 returns = result.test_fn(*inputs)
62 def test_fn(n): function
75 self.assertTransformedResult(test_fn, constant_op.constant(5),
90 def test_fn(n): function
99 with self.converted(test_fn, control_flow, {
103 n, tc = result.test_fn(constant_op.constant(5))
111 def test_fn(n): function
119 self.assertTransformedResult(test_fn, constant_op.constant(5), (10, 5, 5))
[all …]
Dbreak_statements_test.py29 def assertTransformedEquivalent(self, test_fn, *inputs): argument
30 with self.converted(test_fn, break_statements, {},
32 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs))
36 def test_fn(x): function
45 self.assertTransformedEquivalent(test_fn, 0)
46 self.assertTransformedEquivalent(test_fn, 1)
47 self.assertTransformedEquivalent(test_fn, 4)
51 def test_fn(a): function
60 with self.converted(test_fn, break_statements, {},
64 self.assertEqual([3], result.test_fn([5, 4]))
[all …]
Dcall_trees_test.py34 def test_fn(f): function
37 with self.converted(test_fn, (function_scopes, call_trees), {}) as result:
38 self.assertEqual(result.test_fn(lambda: 1), 21)
43 def test_fn(f, g): function
46 with self.converted(test_fn, (function_scopes, call_trees), {}) as result:
47 self.assertEqual(result.test_fn(lambda x: x + 300, lambda: 1), 4321)
55 def test_fn(f, g): function
58 with self.converted(test_fn, (function_scopes, call_trees), {}) as result:
59 self.assertEqual(result.test_fn(lambda x: x + 20, lambda: 1), 321)
70 def test_fn(): function
[all …]
Darg_defaults_test.py36 def test_fn(): function
39 node, ctx = self.prepare(test_fn, {})
45 def test_fn(a, b, *c, **e): function
48 node, ctx = self.prepare(test_fn, {})
56 def test_fn(a, b=1, c=2): function
59 node, ctx = self.prepare(test_fn, {})
65 def test_fn(a, b=1, *c): # pylint: disable=keyword-arg-before-vararg function
68 node, ctx = self.prepare(test_fn, {})
74 def test_fn(): function
77 node, ctx = self.prepare(test_fn, {})
[all …]
Dlogical_expressions_test.py33 def test_fn(a, b): function
36 with self.converted(test_fn, logical_expressions, {}) as result:
38 self.assertTrue(sess.run(result.test_fn(constant_op.constant(1), 1)))
39 self.assertFalse(sess.run(result.test_fn(constant_op.constant(1), 2)))
44 def test_fn(a, b, c): function
47 with self.converted(test_fn, logical_expressions, {}) as result:
50 sess.run(result.test_fn(constant_op.constant(True), False, False)))
52 sess.run(result.test_fn(constant_op.constant(True), False, True)))
57 def test_fn(a, b, c, d): function
60 with self.converted(test_fn, logical_expressions, {}) as result:
[all …]
Dlist_comprehensions_test.py28 def assertTransformedEquivalent(self, test_fn, *inputs): argument
29 with self.converted(test_fn, list_comprehensions, {}) as result:
30 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs))
34 def test_fn(l): function
38 self.assertTransformedEquivalent(test_fn, [])
39 self.assertTransformedEquivalent(test_fn, [1, 2, 3])
43 def test_fn(l): function
47 self.assertTransformedEquivalent(test_fn, [])
48 self.assertTransformedEquivalent(test_fn, [[1], [2], [3]])
52 def test_fn(l): function
[all …]
Dlists_test.py41 def test_fn(): function
44 with self.converted(test_fn, lists, {}) as result:
45 tl = result.test_fn()
52 def test_fn(): function
55 with self.converted(test_fn, lists, {}) as result:
56 self.assertAllEqual(result.test_fn(), [1, 2, 3])
60 def test_fn(): function
67 with self.converted(test_fn, lists, ns) as result:
69 tl = result.test_fn()
75 def test_fn(): function
[all …]
Dconditional_expressions_test.py28 def assertTransformedEquivalent(self, test_fn, *inputs): argument
30 with self.converted(test_fn, conditional_expressions, ns) as result:
31 self.assertEqual(test_fn(*inputs), result.test_fn(*inputs))
35 def test_fn(x): function
38 self.assertTransformedEquivalent(test_fn, 0)
39 self.assertTransformedEquivalent(test_fn, 3)
43 def test_fn(x): function
47 self.assertTransformedEquivalent(test_fn, -2)
48 self.assertTransformedEquivalent(test_fn, 0)
49 self.assertTransformedEquivalent(test_fn, 2)
Dfunction_scopes_test.py36 def test_fn(l): function
42 with self.converted(test_fn, function_scopes, {}) as result:
43 result_op = result.test_fn(constant_op.constant(1))
45 self.assertEqual('Docstring.', result.test_fn.__doc__)
52 def test_fn(): function
59 with self.converted(test_fn, function_scopes, {},
61 result_op = result.test_fn()
63 self.assertIn('First sentence.', result.test_fn.__doc__)
64 self.assertIn('Second sentence.', result.test_fn.__doc__)
69 def test_fn(l): function
[all …]
Ddirectives_test.py33 def test_fn(): function
38 node, ctx = self.prepare(test_fn, {'directives': directives})
49 def test_fn(a): function
52 node, ctx = self.prepare(test_fn, {'directives': directives})
62 def test_fn(): function
67 node, ctx = self.prepare(test_fn, {'directives': directives})
78 def test_fn(): function
81 node, ctx = self.prepare(test_fn, {'directives': directives})
87 def test_fn(): function
93 node, ctx = self.prepare(test_fn, {'directives': directives})
[all …]
/external/tensorflow/tensorflow/python/autograph/pyct/
Dcfg_test.py49 def test_fn(a): function
56 graphs, node = self._build_cfg(test_fn)
71 def test_fn(a): function
78 graphs, node = self._build_cfg(test_fn)
146 def test_fn(a): function
152 graph, = self._build_cfg(test_fn).values()
166 def test_fn(a, b): function
170 graph, = self._build_cfg(test_fn).values()
182 def test_fn(a): function
186 graph, = self._build_cfg(test_fn).values()
[all …]
Dorigin_info_test.py56 def _create_source_map(self, test_fn): argument
57 node, source = parser.parse_entity(test_fn, ())
58 origin_info.resolve_entity(node, source, test_fn)
64 test_fn = basic_definitions.simple_function
65 source_map = self._create_source_map(test_fn)
66 module_path = tf_inspect.getsourcefile(test_fn)
78 test_fn = basic_definitions.function_with_multiline_call
79 source_map = self._create_source_map(test_fn)
80 module_path = tf_inspect.getsourcefile(test_fn)
103 test_fn = basic_definitions.simple_function
[all …]
Dinspect_utils_test.py102 def test_fn(): function
106 self.assertFalse(inspect_utils.islambda(test_fn))
154 def test_fn(a): function
159 inspect_utils.getimmediatesource(test_fn), expected)
174 def test_fn(a): function
179 inspect_utils.getimmediatesource(test_fn), expected)
198 def test_fn(a): function
203 inspect_utils.getimmediatesource(test_fn), expected)
214 def test_fn(a): function
219 inspect_utils.getimmediatesource(test_fn), expected)
[all …]
/external/tensorflow/tensorflow/python/autograph/pyct/static_analysis/
Dliveness_test.py37 def _parse_and_analyze(self, test_fn): argument
38 node, source = parser.parse_entity(test_fn, future_features=())
71 def test_fn(x, a, b, c): # pylint:disable=unused-argument function
79 node = self._parse_and_analyze(test_fn)
87 def test_fn(x, a, b, c): # pylint:disable=unused-argument function
96 node = self._parse_and_analyze(test_fn)
105 def test_fn(x, a): function
112 node = self._parse_and_analyze(test_fn)
120 def test_fn(x, a): function
129 node = self._parse_and_analyze(test_fn)
[all …]
Dactivity_test.py115 def _parse_and_analyze(self, test_fn): argument
116 node, source = parser.parse_entity(test_fn, future_features=())
145 def test_fn(a): function
151 node, _ = self._parse_and_analyze(test_fn)
168 def test_fn(a): function
174 node, _ = self._parse_and_analyze(test_fn)
186 def test_fn(a): function
191 node, _ = self._parse_and_analyze(test_fn)
201 def test_fn(a): function
207 node, _ = self._parse_and_analyze(test_fn)
[all …]
Dreaching_definitions_test.py39 def _parse_and_analyze(self, test_fn): argument
40 node, source = parser.parse_entity(test_fn, future_features=())
85 def test_fn(a, b): function
91 node = self._parse_and_analyze(test_fn)
103 def test_fn(a, b): # pylint:disable=unused-argument function
112 node = self._parse_and_analyze(test_fn)
120 def test_fn(a, b): function
130 node = self._parse_and_analyze(test_fn)
140 def test_fn(a, b): function
150 node = self._parse_and_analyze(test_fn)
[all …]
/external/tensorflow/tensorflow/python/autograph/utils/
Dpy_func_test.py31 def test_fn(a, b, c): function
35 result = py_func.wrap_py_func(test_fn, dtypes.int32,
38 result = py_func.wrap_py_func(test_fn, dtypes.int32, (1, 1, 1))
41 test_fn, dtypes.int32,
52 def test_fn(a, b): function
56 result = py_func.wrap_py_func(test_fn, dtypes.int32, (7, TestClass()))
58 result = py_func.wrap_py_func(test_fn, dtypes.int32,
69 def test_fn(a, b, c, d): function
73 result = py_func.wrap_py_func(test_fn, dtypes.int32, (7, TestClass(5)), {
78 result = py_func.wrap_py_func(test_fn, dtypes.int32,
[all …]
/external/tensorflow/tensorflow/python/autograph/impl/
Dapi_test.py262 def test_fn(x): function
268 test_fn, (constant_op.constant(-1),), None, options=DEFAULT_RECURSIVE)
274 def test_fn(x, y, z): function
280 functools.partial(test_fn, constant_op.constant(-1), z=-3),
288 functools.partial(test_fn, constant_op.constant(-1)), z=-3),
296 def test_fn(x, y, z): function
301 partial_fn = functools.partial(test_fn, constant_op.constant(-1), z=-3)
528 def test_fn(_): function
531 converter_testing.whitelist(test_fn)
533 functools.partial(test_fn, None), (), None, options=DEFAULT_RECURSIVE)
[all …]
Dconversion_test.py51 def test_fn(): function
54 self.assertFalse(conversion.is_whitelisted(test_fn))
61 def test_fn(): function
63 tf_like.test_fn = test_fn
64 test_fn.__module__ = tf_like
66 self.assertFalse(conversion.is_whitelisted(tf_like.test_fn))
112 def test_fn(self): function
116 test_fn,
282 def test_fn(): function
288 new_f = conversion.convert(test_fn, self._simple_program_ctx())
[all …]
/external/tensorflow/tensorflow/python/autograph/core/
Dconverter_test.py50 reparsed_opts = reparsed.test_fn()
66 def test_fn(): function
71 node, ctx = self.prepare(test_fn, ns)
87 def test_fn(): function
92 node, ctx = self.prepare(test_fn, ns)
103 def test_fn(): function
110 node, ctx = self.prepare(test_fn, ns)
130 def test_fn(): function
137 node, ctx = self.prepare(test_fn, ns)
/external/OpenCL-CTS/test_conformance/images/clFillImage/
Dtest_loops.cpp41 test_func test_fn; in test_image_type() local
47 test_fn = &test_fill_image_set_1D; in test_image_type()
53 test_fn = &test_fill_image_set_2D; in test_image_type()
59 test_fn = &test_fill_image_set_1D_array; in test_image_type()
65 test_fn = &test_fill_image_set_2D_array; in test_image_type()
71 test_fn = &test_fill_image_set_3D; in test_image_type()
119 test_fn(device, context, queue, &formatList[i], in test_image_type()
/external/OpenCL-CTS/test_conformance/spir/
Dkhr.csv1321 "basic", "test_fn.prefetch_double8", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1322 "basic", "test_fn.vload_global_double3", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1323 "basic", "test_fn.prefetch_double2", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1324 "basic", "test_fn.prefetch_double4", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1325 "basic", "test_fn.async_copy_global_to_local_double4", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1326 "basic", "test_fn.vstore_local_double8", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1327 "basic", "test_fn.async_strided_copy_global_to_local_double8", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1328 "basic", "test_fn.async_copy_local_to_global_double16", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1329 "basic", "test_fn.vstore_global_double4", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
1330 "basic", "test_fn.vstore_global_double3", "cl_khr_fp64", "CL_FALSE", "CL_FALSE"
[all …]
/external/tensorflow/tensorflow/python/autograph/operators/
Dcontrol_flow_test.py372 def test_fn(): function
382 self.evaluate(test_fn())
388 def test_fn(): function
407 self.assertAllEqual(test_fn(), 1234)
412 def test_fn(): function
431 self.assertAllEqual(test_fn(), [0, 1, 2, 3, 4])
442 def test_fn(): function
452 self.evaluate(test_fn())
508 def test_fn(): function
518 self.evaluate(test_fn())
[all …]

123