Merge pull request #16920 from qingqing01/test_profile

Fix test_profiler when the machine has many cores.
shanyi15-patch-1
Tao Luo 6 years ago committed by GitHub
commit aed702cea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,6 +26,10 @@ import paddle.fluid.proto.profiler.profiler_pb2 as profiler_pb2
class TestProfiler(unittest.TestCase):
@classmethod
def setUpClass(cls):
os.environ['CPU_NUM'] = str(4)
def net_profiler(self, state, use_parallel_executor=False):
profile_path = os.path.join(tempfile.gettempdir(), "profile")
open(profile_path, "w").write("")

Loading…
Cancel
Save