Make this fail early when the actual problem happens

This commit is contained in:
Ryan Voots 2023-10-26 09:38:59 -04:00
parent 9fb99f61e7
commit 153c085a32

View file

@ -98,7 +98,10 @@ if BUILD_CUDA_EXT:
if platform.system() != 'Windows':
p = int(subprocess.run("cat /proc/cpuinfo | grep cores | head -1", shell=True, check=True, text=True, stdout=subprocess.PIPE).stdout.split(" ")[2])
subprocess.call(["python", "./autogptq_extension/qigen/generate.py", "--module", "--search", "--p", str(p)])
ret = subprocess.call(["python", "./autogptq_extension/qigen/generate.py", "--module", "--search", "--p", str(p)])
if ret != 0:
raise Exception(f"Failed generate with {ret}")
sys.exit(-1)
if not ROCM_VERSION:
from distutils.sysconfig import get_python_lib