Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore BUILD_* options #1044

Closed

Conversation

wkpark
Copy link
Contributor

@wkpark wkpark commented Feb 6, 2024

  • support both BUILD_* and COMPUTE_BACKEND options

internally COMPUTE_BACKEND=cpu|cuda|mps use BUILD_* options, so we can support old options with minor fix.

  • use COMPUTE_BACKEND if it is available. (default value is "") => "cpu" build will be selected.
  • the default build is "cpu" without any given options. (previously default is "BUILD_CUDA=ON")
  • with this fix, we can restore the old Makefile behavior.

 * support both BUILD_* and COMPUTE_BACKEND options
@rickardp
Copy link
Contributor

rickardp commented Feb 6, 2024

What is the expected outcome of -DBUILD_CUDA=ON -DBUILD_MPS=ON ?

Copy link

github-actions bot commented Feb 6, 2024

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

set_property(CACHE COMPUTE_BACKEND PROPERTY STRINGS cpu cuda mps)
option(PTXAS_VERBOSE "Pass through -v flag to PTX Assembler" OFF)

if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.1)
endif()

option(BUILD_CUDA "Build bitsandbytes with CUDA support" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows specifying both MPS and CUDA at the same time, which will fail as it is now. What is the expected outcome?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previously implemented CMakeLists.txt does not do much and, BUILD_MPS even not work currently.

set_property(CACHE COMPUTE_BACKEND PROPERTY STRINGS cpu cuda mps)
option(PTXAS_VERBOSE "Pass through -v flag to PTX Assembler" OFF)

if(APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 13.1)
endif()

option(BUILD_CUDA "Build bitsandbytes with CUDA support" OFF)
option(BUILD_MPS "Build bitsandbytes with MPS support" OFF)
option(NO_CUBLASLT "Disable CUBLAS" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option is only valid when building for CUDA

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO_CUBLASLT was old Makefile stuff and previously implemented CMakeLists.txt does not break its old behavior.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it important not to break the old Makefile flags?


if(${COMPUTE_BACKEND} STREQUAL "cuda")
if("${COMPUTE_BACKEND}" STREQUAL "cuda")
if(APPLE)
message(FATAL_ERROR "CUDA is not supported on macOS" )
Copy link
Contributor

@rickardp rickardp Feb 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is ignored when specifying -DBUILD_CUDA=ON, but redundant since done on line 63

@wkpark
Copy link
Contributor Author

wkpark commented Feb 6, 2024

The documentation for the command has been updated in PR #1047, close this issue.

@wkpark wkpark closed this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants