optimize summary support cpu

pull/1923/head
wenkai 5 years ago
parent ed77c761ec
commit 0090682ae7

@ -14,6 +14,7 @@
# ============================================================================ # ============================================================================
"""Summary cpu st.""" """Summary cpu st."""
import os import os
import platform
import tempfile import tempfile
import numpy as np import numpy as np
@ -58,14 +59,15 @@ def train_summary_record(test_writer, steps):
return out_me_dict return out_me_dict
class TestCpuSummary:
"""Test cpu summary."""
@pytest.mark.level0 @pytest.mark.level0
@pytest.mark.platform_x86_cpu_training @pytest.mark.platform_x86_cpu
@pytest.mark.env_onecard @pytest.mark.env_onecard
def test_summary_step2_summary_record1(self): def test_summary_step2_summary_record1():
"""Test record 10 step summary.""" """Test record 10 step summary."""
if platform.system() == "Windows":
# Summary does not support windows currently.
return
with tempfile.TemporaryDirectory() as tmp_dir: with tempfile.TemporaryDirectory() as tmp_dir:
steps = 2 steps = 2
with SummaryRecord(tmp_dir) as test_writer: with SummaryRecord(tmp_dir) as test_writer:

Loading…
Cancel
Save