File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
+ ## [ 0.16.2] - 12/20/2024
8
+
9
+ ### Fixed
10
+
11
+ * Enabled ` dpnp ` in virtual environment on Windows platform [ #2242 ] ( https://github.com/IntelPython/dpnp/pull/2242 )
12
+
13
+
7
14
## [ 0.16.1] - 12/06/2024
8
15
9
16
This is a bug-fix release.
Original file line number Diff line number Diff line change 25
25
# *****************************************************************************
26
26
27
27
import os
28
+ import sys
28
29
29
30
mypath = os .path .dirname (os .path .realpath (__file__ ))
30
31
45
46
if hasattr (os , "add_dll_directory" ):
46
47
os .add_dll_directory (mypath )
47
48
os .add_dll_directory (dpctlpath )
49
+
48
50
os .environ ["PATH" ] = os .pathsep .join (
49
51
[os .getenv ("PATH" , "" ), mypath , dpctlpath ]
50
52
)
51
53
54
+ # For virtual environments on Windows, add folder with DPC++ libraries
55
+ # to the DLL search path
56
+ if sys .base_exec_prefix != sys .exec_prefix and os .path .isfile (
57
+ os .path .join (sys .exec_prefix , "pyvenv.cfg" )
58
+ ):
59
+ dll_path = os .path .join (sys .exec_prefix , "Library" , "bin" )
60
+ if os .path .isdir (dll_path ):
61
+ os .environ ["PATH" ] = os .pathsep .join (
62
+ [os .getenv ("PATH" , "" ), dll_path ]
63
+ )
64
+
52
65
# Borrowed from DPCTL
53
66
from dpctl .tensor import DLDeviceType
54
67
You can’t perform that action at this time.
0 commit comments