01b988e5a3a32d44714404070b9aae09d4e93887,utils/tools.py,,gpumemusage,#,123
Before Change
def gpumemusage():
gpu_mem = subprocess.check_output("nvidia-smi | grep MiB | cut -f 3 -d "|"", shell=True).replace(" ", "").replace("\n", "").replace("i", "")
curr, tot = [float(a[:-2]) for a in gpu_mem.split("/")]
util = "%1.2f"%(100*curr/tot)+"%"
cmem = str(int(math.ceil(curr/1024.)))+"GB"
After Change
all_stat = [float(a) for a in gpu_mem.replace("/","").split("MB")[:-1]]
gpu_mem = ""
for i in range(len(all_stat)/2):
curr, tot = all_stat[2*i], all_stat[2*i+1]
util = "%1.2f"%(100*curr/tot)+"%"
cmem = str(int(math.ceil(curr/1024.)))+"GB"
gmem = str(int(math.ceil(tot/1024.)))+"GB"
gpu_mem += util + "--" + join(cmem, gmem) + " "
return gpu_mem
def update_hyperparameter_schedule(args, epoch, global_iteration, optimizer):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: NVIDIA/flownet2-pytorch
Commit Name: 01b988e5a3a32d44714404070b9aae09d4e93887
Time: 2017-12-05
Author: freda@gcf-sdgx-01.nvidia.com
File Name: utils/tools.py
Class Name:
Method Name: gpumemusage
Project Name: brilee/MuGo
Commit Name: a74090f72c022d1a6dd6e13a111faa8c571a3726
Time: 2016-06-28
Author: brian.kihoon.lee@gmail.com
File Name: go.py
Class Name: Position
Method Name: __str__
Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: