Skip to content

Commit

Permalink
Merge pull request #8134 from kmaehashi/specify-static-libraries-as-l…
Browse files Browse the repository at this point in the history
…ibraries

Do not search for static libs
  • Loading branch information
asi1024 committed Jan 25, 2024
2 parents 37602b2 + 79f5bea commit 5d5ef64
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions install/cupy_builder/_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ def __init__(self, ctx: Context):
# This is used only for testing availability of the feature.
self.includes: List[str] = []

# Shared libraries to be linked.
# Libraries (shared/static) on the search path to be linked.
self.libraries: List[str] = []

# Static libraries to be linked.
# Static libraries (manually searched) to be linked.
self.static_libraries: List[str] = []

# Version of the feature.
Expand Down Expand Up @@ -147,7 +147,8 @@ def _from_dict(d: Dict[str, Any], ctx: Context) -> Feature:

# Libraries required for cudart_static
_cudart_static_libs = (
['pthread', 'rt', 'dl'] if sys.platform == 'linux' else []
['cudart_static'] +
(['pthread', 'rt', 'dl'] if sys.platform == 'linux' else [])
)


Expand Down Expand Up @@ -271,10 +272,6 @@ def get_features(ctx: Context) -> Dict[str, Feature]:
'cub/util_namespace.cuh', # dummy
],
'libraries': list(_cudart_static_libs),
'static_libraries': [
# Dependency from CUB header files
'cudart_static',
],
'check_method': build.check_cub_version,
'version_method': build.get_cub_version,
}
Expand All @@ -294,10 +291,6 @@ def get_features(ctx: Context) -> Dict[str, Feature]:
'cuda',
'nvrtc',
] + _cudart_static_libs,
'static_libraries': [
# Dependency from Jitify header files
'cudart_static',
],
'check_method': build.check_jitify_version,
'version_method': build.get_jitify_version,
}
Expand All @@ -314,9 +307,6 @@ def get_features(ctx: Context) -> Dict[str, Feature]:
'libraries': [
'curand',
] + _cudart_static_libs,
'static_libraries': [
'cudart_static',
],
}
HIP_random = {
'name': 'random',
Expand Down Expand Up @@ -405,10 +395,6 @@ def get_features(ctx: Context) -> Dict[str, Feature]:
'thrust/sort.h',
],
'libraries': list(_cudart_static_libs),
'static_libraries': [
# Dependency from Thrust header files
'cudart_static',
],
'check_method': build.check_thrust_version,
'version_method': build.get_thrust_version,
}
Expand Down Expand Up @@ -475,7 +461,6 @@ def __init__(self, ctx: Context):
# CUDA Toolkit
['cublas', 'cufft', 'curand', 'cusparse']
)
self.static_libraries = ['cudart_static']
self._version = self._UNDETERMINED

def configure(self, compiler: Any, settings: Any) -> bool:
Expand Down

0 comments on commit 5d5ef64

Please sign in to comment.