From 3fd06fb6206f46b6d18fbb8a512da63832dea98b Mon Sep 17 00:00:00 2001 From: Titus von Koeller Date: Mon, 1 Aug 2022 09:30:29 -0700 Subject: refactored subshell execution code for greater readability and moved it to utils --- bitsandbytes/cuda_setup.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'bitsandbytes/cuda_setup.py') diff --git a/bitsandbytes/cuda_setup.py b/bitsandbytes/cuda_setup.py index 0dd53c5..8cc2c03 100644 --- a/bitsandbytes/cuda_setup.py +++ b/bitsandbytes/cuda_setup.py @@ -19,8 +19,6 @@ evaluation: """ import ctypes -import shlex -import subprocess from os import environ as env from pathlib import Path from typing import Set, Union @@ -28,15 +26,6 @@ from typing import Set, Union from .utils import print_err, warn_of_missing_prerequisite -def execute_and_return(strCMD): - proc = subprocess.Popen( - shlex.split(strCMD), stdout=subprocess.PIPE, stderr=subprocess.PIPE - ) - out, err = proc.communicate() - out, err = out.decode("UTF-8").strip(), err.decode("UTF-8").strip() - return out, err - - def check_cuda_result(cuda, result_val): if result_val != 0: cuda.cuGetErrorString(result_val, ctypes.byref(error_str)) -- cgit v1.2.3