Reorganize CUB environment variables
See original GitHub issueCurrently there’re 4 CUB-related environment variables.
- CUB_PATH: used at build time to build cupy.cuda.cub
- CUPY_CUB_PATH: used at runtime to build reduction kernel (#3244)
- CUPY_CUB_BLOCK_REDUCTION_DISABLED (default: 1): Set to 0 to enable performance boost in reduction kernel (#3244)
- CUB_DISABLED (default: 1): Set to 0 to enable CUB in various computations
We think it is better to disable CUB by default, even in CUDA 11, as users expect reproducibility (deterministic behavior). Instead, we need to provide a simple “opt-in” method to enable CUB for users needing a performance boost.
This issue proposes the followings:
- Remove CUB_PATH and CUPY_CUB_PATH (always use bundled CUB #2584 or CUDA 11 built-CUB, as user-provided CUB headers are unlikely to be used (considering we haven’t requested to implement CUPY_THRUST_PATH).
- In CUDA 11, use CUB included in CUDA runtime. If CUB headers are unavailable in system (e.g., maybe in “runtime” docker container; need to check after CUDA 11 is finally released), use CUB bundled in CuPy.
- In CUDA 10 or earlier, always use CUB bundled in CuPy.
- Merge
CUPY_CUB_BLOCK_REDUCTION_DISABLED
andCUB_DISABLED
into one environment variableCUPY_BACKENDS="cub,cutensor"
(default: “”, i.e., cub/cutensor disabled by default). Users can specify backends in the referred order, separated by a comma. Boolean flags (cupy.core.cub_block_reduction_enabled
andcupy.cuda.cub_enabled
) are removed for consistency. - For testing and debugging purposes, provide the following undocumented APIs:
cupy.core.set_routine_backends(['cub', 'cutensor'])
cupy.core.set_reduction_backends(['cub', 'cutensor'])
(edit 2020-06-25: updated based on the latest discussion)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:22 (22 by maintainers)
Top Results From Across the Web
Configuring Environment Variables — CUBRID 9.1.0 ...
CUBRID_DATABASES: The environment variable that designates the location of the databases.txt file. The CUBRID system stores the absolute path of database ...
Read more >Environment Variables | Cube Docs
Cube defines a number of environment variables that can be used to change behavior. Some of these variables can also be set via...
Read more >Rapid Environment Editor - The Windows Club
Rapid Environment Editor is a powerful Environment Value or Variables Editor for Windows 11/10. Read review, download Rapid EE free.
Read more >Node.js - How to organize environment variables
Let's say we have only one environment variable, X . X will have a different value in development and production.
Read more >The Effects of Cortical Reorganization and Applications of ...
Numerous studies have attempted to study the variables that affect CI outcomes, including the personal characteristics of CI candidates, environmental ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My idea is:
CUB_PATH
.@asi1024 @emcastillo How do you think?
I’m now preparing CI for CUDA 11. The first cupy-cuda110 release would be in the next month.
I think we should stick to the bundled cub when distributing binaries because it is the main one tested and make user configurations deterministic across package systems. Changing packages versions depending on the environment is most likely going to give us headaches later on.
If the user wants to try a different cub version then he/she can update the submodule folder.