Apply thread limit to intra_op_num_threads (#529)

This commit is contained in:
Lajcisvk 2023-10-21 01:09:11 +02:00 committed by GitHub
parent 0d0f6c66f4
commit 9eb3da12c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,5 +39,6 @@ def new_session(
if "OMP_NUM_THREADS" in os.environ:
sess_opts.inter_op_num_threads = int(os.environ["OMP_NUM_THREADS"])
sess_opts.intra_op_num_threads = int(os.environ["OMP_NUM_THREADS"])
return session_class(model_name, sess_opts, providers, *args, **kwargs)