Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
bitsandbytes
Commits
659a7dfc
Commit
659a7dfc
authored
Apr 11, 2023
by
Tim Dettmers
Browse files
Fixing #300.
parent
eb1c331c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
bitsandbytes/cuda_setup/main.py
bitsandbytes/cuda_setup/main.py
+4
-4
No files found.
bitsandbytes/cuda_setup/main.py
View file @
659a7dfc
...
@@ -212,12 +212,12 @@ def find_cuda_lib_in(paths_list_candidate: str) -> Set[Path]:
...
@@ -212,12 +212,12 @@ def find_cuda_lib_in(paths_list_candidate: str) -> Set[Path]:
def
warn_in_case_of_duplicates
(
results_paths
:
Set
[
Path
])
->
None
:
def
warn_in_case_of_duplicates
(
results_paths
:
Set
[
Path
])
->
None
:
if
len
(
results_paths
)
>
1
:
if
len
(
results_paths
)
>
1
:
warning_msg
=
(
warning_msg
=
(
f
"Found duplicate
{
CUDA_RUNTIME_LIB
}
files:
{
results_paths
}
.. "
f
"Found duplicate
{
CUDA_RUNTIME_LIB
S
}
files:
{
results_paths
}
.. "
"We'll flip a coin and try one of these, in order to fail forward.
\n
"
"We'll flip a coin and try one of these, in order to fail forward.
\n
"
"Either way, this might cause trouble in the future:
\n
"
"Either way, this might cause trouble in the future:
\n
"
"If you get `CUDA error: invalid device function` errors, the above "
"If you get `CUDA error: invalid device function` errors, the above "
"might be the cause and the solution is to make sure only one "
"might be the cause and the solution is to make sure only one "
f
"
{
CUDA_RUNTIME_LIB
}
in the paths that we search based on your env."
)
f
"
{
CUDA_RUNTIME_LIB
S
}
in the paths that we search based on your env."
)
CUDASetup
.
get_instance
().
add_log_entry
(
warning_msg
,
is_warning
=
True
)
CUDASetup
.
get_instance
().
add_log_entry
(
warning_msg
,
is_warning
=
True
)
...
@@ -245,7 +245,7 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]:
...
@@ -245,7 +245,7 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]:
return
next
(
iter
(
conda_cuda_libs
))
return
next
(
iter
(
conda_cuda_libs
))
CUDASetup
.
get_instance
().
add_log_entry
(
f
'
{
candidate_env_vars
[
"CONDA_PREFIX"
]
}
did not contain '
CUDASetup
.
get_instance
().
add_log_entry
(
f
'
{
candidate_env_vars
[
"CONDA_PREFIX"
]
}
did not contain '
f
'
{
CUDA_RUNTIME_LIB
}
as expected! Searching further paths...'
,
is_warning
=
True
)
f
'
{
CUDA_RUNTIME_LIB
S
}
as expected! Searching further paths...'
,
is_warning
=
True
)
if
"LD_LIBRARY_PATH"
in
candidate_env_vars
:
if
"LD_LIBRARY_PATH"
in
candidate_env_vars
:
lib_ld_cuda_libs
=
find_cuda_lib_in
(
candidate_env_vars
[
"LD_LIBRARY_PATH"
])
lib_ld_cuda_libs
=
find_cuda_lib_in
(
candidate_env_vars
[
"LD_LIBRARY_PATH"
])
...
@@ -255,7 +255,7 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]:
...
@@ -255,7 +255,7 @@ def determine_cuda_runtime_lib_path() -> Union[Path, None]:
warn_in_case_of_duplicates
(
lib_ld_cuda_libs
)
warn_in_case_of_duplicates
(
lib_ld_cuda_libs
)
CUDASetup
.
get_instance
().
add_log_entry
(
f
'
{
candidate_env_vars
[
"LD_LIBRARY_PATH"
]
}
did not contain '
CUDASetup
.
get_instance
().
add_log_entry
(
f
'
{
candidate_env_vars
[
"LD_LIBRARY_PATH"
]
}
did not contain '
f
'
{
CUDA_RUNTIME_LIB
}
as expected! Searching further paths...'
,
is_warning
=
True
)
f
'
{
CUDA_RUNTIME_LIB
S
}
as expected! Searching further paths...'
,
is_warning
=
True
)
remaining_candidate_env_vars
=
{
remaining_candidate_env_vars
=
{
env_var
:
value
for
env_var
,
value
in
candidate_env_vars
.
items
()
env_var
:
value
for
env_var
,
value
in
candidate_env_vars
.
items
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment