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

CMake and Windows Compilation #788

Conversation

Jamezo97
Copy link
Contributor

I've attempted to setup a general CMakeLists.txt that will work cross platform, including on Windows.

To get things building on Windows some code changes were required.

  1. Replace pthread with std thread. I've tried to keep the code consistent and fast here.
  2. Explicitly declare all combinations of templated functions. I'm surprised this compiled before, I must be missing something here?
  3. Don't use the IsComplete template meta, the MSVC compiler gets pretty sad. I've switched it out with something that's technically equivalent given the current usage of the class.

Hopefully this is useful.

@wkpark wkpark mentioned this pull request Nov 15, 2023
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Nov 16, 2023
manually cherry-picked from PR bitsandbytes-foundation#788 and cleanup

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Nov 16, 2023
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Dec 6, 2023
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Dec 6, 2023
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Dec 11, 2023
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Dec 13, 2023
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@github-actions github-actions bot closed this Dec 29, 2023
@TimDettmers
Copy link
Collaborator

This is a very important contribution. Thank you for being so patient. We will work on this soon.

@TimDettmers TimDettmers reopened this Jan 1, 2024
@TimDettmers TimDettmers added high priority (first issues that will be worked on) Medium risk Risk of bugs in transformers and other libraries labels Jan 1, 2024

if(BUILD_CUDA)
target_compile_definitions(libbitsandbytes PUBLIC BUILD_CUDA)
target_link_libraries(libbitsandbytes PUBLIC cudart cublas cusparse)

Choose a reason for hiding this comment

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

you should be using https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html#module:FindCUDAToolkit and the targets associacted with it

green-s pushed a commit to green-s/bitsandbytes that referenced this pull request Jan 18, 2024
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Jan 29, 2024
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
@wkpark wkpark mentioned this pull request Jan 30, 2024
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Jan 31, 2024
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
wkpark pushed a commit to wkpark/bitsandbytes that referenced this pull request Jan 31, 2024
based on @Jamezo97 and @acpopescu work

manually cherry-picked from PR bitsandbytes-foundation#788 and PR bitsandbytes-foundation#229 and cleanup by wkpark

Signed-off-by: Won-Kyu Park <[email protected]>
@Jamezo97
Copy link
Contributor Author

Jamezo97 commented Feb 1, 2024

Closing due to changes merged in #908

@Jamezo97 Jamezo97 closed this Feb 1, 2024
@wkpark
Copy link
Contributor

wkpark commented Feb 1, 2024

thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
high priority (first issues that will be worked on) Medium risk Risk of bugs in transformers and other libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants