Double GPU performance

This commit is contained in:
henryruhs 2023-06-03 13:43:56 +02:00
parent 1f0c3b4bb5
commit 21e2953420

View File

@ -1,11 +1,12 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import os import os
# reducing num threads doubles performance of gpu-mode import sys
# single thread doubles performance of gpu-mode - needs to be set before torch import
if any(arg.startswith('--gpu-vendor=') for arg in sys.argv):
os.environ['OMP_NUM_THREADS'] = '1' os.environ['OMP_NUM_THREADS'] = '1'
import platform import platform
import signal import signal
import sys
import shutil import shutil
import glob import glob
import argparse import argparse