This commit is contained in:
Dun Liang 2021-02-14 23:12:48 +08:00
commit 7d6cb61419
1 changed files with 7 additions and 2 deletions

View File

@ -55,7 +55,11 @@ RUN pip3 install torch torchvision
with open("/tmp/perf_dockerfile", 'w') as f:
f.write(dockerfile_src)
assert os.system("sudo nvidia-smi -lgc 1500") == 0
assert os.system(f"sudo docker build --tag jittor/jittor-perf{suffix} -f /tmp/perf_dockerfile .") == 0
# if the docker image is not built
if os.system(f"sudo docker image inspect jittor/jittor-perf{suffix}"):
assert os.system(f"sudo docker build --tag jittor/jittor-perf{suffix} -f /tmp/perf_dockerfile .") == 0
# run once for compile source
jt_fps = test_main("jittor", "resnet50", 1)
@ -180,7 +184,8 @@ def test(name, model_name, bs):
loss.backward()
opt.step()
else:
x.sync()
if name == "jittor":
x.sync()
sync()
for i in time_iter():
iter()