|
|
|
@ -157,9 +157,13 @@ class Autolog:
|
|
|
|
|
model_precision="fp32"):
|
|
|
|
|
import auto_log
|
|
|
|
|
pid = os.getpid()
|
|
|
|
|
gpu_id = int(os.environ['CUDA_VISIBLE_DEVICES'].split(',')[0])
|
|
|
|
|
infer_config = inference.Config()
|
|
|
|
|
infer_config.enable_use_gpu(100, gpu_id)
|
|
|
|
|
if (os.environ['CUDA_VISIBLE_DEVICES'].strip() != ''):
|
|
|
|
|
gpu_id = int(os.environ['CUDA_VISIBLE_DEVICES'].split(',')[0])
|
|
|
|
|
infer_config = inference.Config()
|
|
|
|
|
infer_config.enable_use_gpu(100, gpu_id)
|
|
|
|
|
else:
|
|
|
|
|
gpu_id = None
|
|
|
|
|
infer_config = inference.Config()
|
|
|
|
|
autolog = auto_log.AutoLogger(
|
|
|
|
|
model_name=model_name,
|
|
|
|
|
model_precision=model_precision,
|
|
|
|
|