Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-b-miller committed Nov 7, 2024
1 parent e7353bc commit ac735cf
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions numba_cuda/numba/cuda/cuda_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_debian_pkg_libdevice():

def get_current_cuda_target_name():
"""Determine conda's CTK target folder based on system and machine arch.
CTK's conda package delivers headers based on its architecture type. For example,
`x86_64` machine places header under `$CONDA_PREFIX/targets/x86_64-linux`, and
`aarch64` places under `$CONDA_PREFIX/targets/sbsa-linux`. Read more about the
Expand All @@ -278,9 +278,10 @@ def get_current_cuda_target_name():
'aarch64': 'sbsa-linux'
}
return arch_to_targets.get(machine)

return None


def get_conda_include_dir():
"""
Return the include directory in the current conda environment, if one
Expand All @@ -291,10 +292,13 @@ def get_conda_include_dir():

if conda_prefix:
if target_name:
include_dir = os.path.join(conda_prefix, f'targets/{target_name}/include')
include_dir = os.path.join(
conda_prefix, f'targets/{target_name}/include'
)
else:
# A fallback when target cannot determined, though usually it shouldn't.
include_dir = os.path.join(conda_prefix, f'include')
# A fallback when target cannot determined
# though usually it shouldn't.
include_dir = os.path.join(conda_prefix, 'include')
if os.path.exists(include_dir):
return include_dir
return None
Expand Down

0 comments on commit ac735cf

Please sign in to comment.