File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,18 @@ def _get_backend_path_config() -> _BackendPathConfig:
4949 platform_name = platform .system ()
5050 cuda_found = False
5151
52- # Try to use user provided AF_PATH if explicitly set
53- af_path = os .environ .get ("AF_PATH" , None )
54- af_is_user_path = af_path is not None
52+ # try to use user provided AF_PATH if explicitly set
53+ try :
54+ af_path = Path (os .environ ["AF_PATH" ])
55+ af_is_user_path = True
56+ except KeyError :
57+ af_path = None
58+ af_is_user_path = False
5559
56- cuda_path = os .environ .get ("CUDA_PATH" , None )
60+ try :
61+ cuda_path = Path (os .environ ["CUDA_PATH" ])
62+ except KeyError :
63+ cuda_path = None
5764
5865 # Try to find default arrayfire installation paths
5966 if platform_name == _SupportedPlatforms .windows .value or _SupportedPlatforms .is_cygwin (platform_name ):
You can’t perform that action at this time.
0 commit comments