File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
2
# *****************************************************************************
3
- # Copyright (c) 2016-2020 , Intel Corporation
3
+ # Copyright (c) 2016-2022 , Intel Corporation
4
4
# All rights reserved.
5
5
#
6
6
# Redistribution and use in source and binary forms, with or without
30
30
import dpctl
31
31
dpctlpath = os .path .dirname (dpctl .__file__ )
32
32
33
- os .environ ["PATH" ] += os .pathsep + mypath + os .pathsep + dpctlpath
33
+ # For Windows OS with Python >= 3.7, it is required to explicitly define a path
34
+ # where to search for DLLs towards both DPNP backend and DPCTL Sycl interface,
35
+ # otherwise DPNP import will be failing. This is because the libraries
36
+ # are not installed under any of default paths where Python is searching.
37
+ from platform import system
38
+ if system () == 'Windows' :
39
+ if hasattr (os , "add_dll_directory" ):
40
+ os .add_dll_directory (mypath )
41
+ os .add_dll_directory (dpctlpath )
42
+ os .environ ["PATH" ] = os .pathsep .join ([os .getenv ("PATH" , "" ), mypath , dpctlpath ])
34
43
35
44
36
45
from dpnp .dpnp_array import dpnp_array as ndarray
You can’t perform that action at this time.
0 commit comments