mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Re-enabling profiler related unit-tests / sub-tests, that were disabled on the ROCm platform
This commit is contained in:
parent
b50574c455
commit
8c94fd0426
|
|
@ -104,9 +104,6 @@ class TimelineTest(test.TestCase):
|
|||
step_stats = run_metadata.step_stats
|
||||
devices = [d.device for d in step_stats.dev_stats]
|
||||
self.assertTrue('/job:localhost/replica:0/task:0/device:GPU:0' in devices)
|
||||
if not test.is_built_with_rocm():
|
||||
# skip this check for the ROCm platform
|
||||
# stream level tracing is not yet supported on the ROCm platform
|
||||
self.assertTrue('/device:GPU:0/stream:all' in devices)
|
||||
tl = timeline.Timeline(step_stats)
|
||||
ctf = tl.generate_chrome_trace_format()
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ class ProfilerTest(test_util.TensorFlowTestCase):
|
|||
profile_pb.ParseFromString(profile_result)
|
||||
devices = frozenset(device.name for device in profile_pb.devices.values())
|
||||
self.assertIn('/host:CPU', devices)
|
||||
if not test_util.IsBuiltWithROCm() and config.list_physical_devices('GPU'):
|
||||
# device tracing is not yet supported on the ROCm platform
|
||||
if config.list_physical_devices('GPU'):
|
||||
self.assertIn('/device:GPU:0', devices)
|
||||
events = frozenset(event.name for event in profile_pb.trace_events)
|
||||
self.assertIn('three_times_five', events)
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ cuda_py_test(
|
|||
python_version = "PY3",
|
||||
tags = [
|
||||
"no_pip",
|
||||
"no_rocm",
|
||||
],
|
||||
deps = [
|
||||
":profiler_v2",
|
||||
|
|
|
|||
|
|
@ -136,10 +136,6 @@ class RunMetadataTest(test.TestCase):
|
|||
|
||||
ret = _extract_node(run_meta, 'MatMul')
|
||||
self.assertEqual(len(ret['gpu:0']), 1)
|
||||
if not test.is_built_with_rocm():
|
||||
# skip this check for the ROCm platform
|
||||
# stream level tracing is not yet supported on the ROCm platform
|
||||
self.assertEqual(len(ret['gpu:0/stream:all']), 1, '%s' % run_meta)
|
||||
|
||||
@test_util.run_deprecated_v1
|
||||
def testAllocationHistory(self):
|
||||
|
|
@ -251,9 +247,6 @@ class RunMetadataTest(test.TestCase):
|
|||
for node in ret['gpu:0']:
|
||||
total_cpu_execs += node.op_end_rel_micros
|
||||
|
||||
if not test.is_built_with_rocm():
|
||||
# skip this check for the ROCm platform
|
||||
# stream level tracing is not yet supported on the ROCm platform
|
||||
self.assertGreaterEqual(
|
||||
len(ret['gpu:0/stream:all']), 4, '%s' % run_meta)
|
||||
|
||||
|
|
|
|||
|
|
@ -69,13 +69,6 @@ class ProfilerContextTest(test.TestCase):
|
|||
os.path.join(test.get_temp_dir(), "profile_100")) as profiler:
|
||||
profiler.profile_operations(options=opts)
|
||||
with gfile.Open(outfile, "r") as f:
|
||||
|
||||
if test.is_built_with_rocm():
|
||||
# The profiler output for ROCm mode, includes an extra warning
|
||||
# related to the lack of stream tracing in ROCm mode.
|
||||
# Need to skip this warning when doing the diff
|
||||
profile_str = "\n".join(profile_str.split("\n")[7:])
|
||||
|
||||
self.assertEqual(profile_str, f.read())
|
||||
|
||||
@test_util.run_deprecated_v1
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user