Skip to content

Commit f000257

Browse files
committed
update
1 parent 03572ad commit f000257

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

python/cupdlpx/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
import os
16+
import platform
17+
18+
# Windows only: register CUDA bin for dependent DLL loading.
19+
if platform.system() == "Windows":
20+
cuda_path = os.environ.get("CUDA_PATH")
21+
if cuda_path:
22+
bin_path = os.path.join(cuda_path, "bin")
23+
if os.path.isdir(bin_path):
24+
os.add_dll_directory(bin_path)
25+
1526
from .model import Model
1627
from . import PDLP
1728

@@ -23,4 +34,4 @@
2334
try:
2435
__version__ = version("cupdlpx")
2536
except PackageNotFoundError:
26-
__version__ = "0.0.0"
37+
__version__ = "0.0.0"

0 commit comments

Comments
 (0)