|
|
@ -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:
|
|
|
|
@pytest.mark.level0
|
|
|
|
"""Test cpu summary."""
|
|
|
|
@pytest.mark.platform_x86_cpu
|
|
|
|
|
|
|
|
@pytest.mark.env_onecard
|
|
|
|
@pytest.mark.level0
|
|
|
|
def test_summary_step2_summary_record1():
|
|
|
|
@pytest.mark.platform_x86_cpu_training
|
|
|
|
|
|
|
|
@pytest.mark.env_onecard
|
|
|
|
|
|
|
|
def test_summary_step2_summary_record1(self):
|
|
|
|
|
|
|
|
"""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:
|
|
|
|