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

Add compiling support for CUDA v11 and cuDNN v8 #215

Closed
wants to merge 1 commit into from
Closed

Add compiling support for CUDA v11 and cuDNN v8 #215

wants to merge 1 commit into from

Conversation

alealv
Copy link

@alealv alealv commented Oct 29, 2020

Original Issue: [#198] & [#213] & [#147]

Summary

  • I updated CMakeList.txt of third party library (warp-ctc)[https://github.com/baidu-research/warp-ctc]. The latest CMakeLists.txt handles conditional compilation for architecture compute_30 depending on CUDA version (CUDAv11 deprecates this architecture).
  • The same is done for main CMakeLists.txt file
  • The deprecation policy of CUDA has changed. Therefore, the condition of cudnnSetRNNDescriptor used here needs to also include until version 8000 of cuDNN.
  • Finally, with CUDA v11 Nvidia cub is included in CUDA toolkit, but because flashlight downloads and uses it's own version, it collides with Thrust version. Hence, THRUST_IGNORE_CUB_VERSION_CHECK must be define in if using CUDA v11

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 29, 2020
@alealv alealv changed the title Add CUDA v11 compiling support Add compiling support for CUDA v11 and cuDNN v8 Oct 29, 2020
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@tlikhomanenko has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Member

@jacobkahn jacobkahn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @alealv!

Given f7f88c1 is now merged, you'll probably need to rebase these changes given that the location of several core components have changed. Should be painless.


include_directories(include)

FIND_PACKAGE(CUDA 6.5)
MESSAGE(STATUS "warpctc: cuda found ${CUDA_FOUND}")
FIND_PACKAGE(Torch)
Copy link
Member

Choose a reason for hiding this comment

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

Would it be possible to disable looking Torch up front or add QUIET to this at the very least? It would probably confuse the user quite a lot if the build looks for Torch.

@@ -82,6 +82,11 @@ if (FL_LIBRARIES_USE_CUDA)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..> # TODO(jacobkahn): fix me
)

# TODO For CUDA version 11 CUB doesn't have to be built
if (CUDA_VERSION VERSION_GREATER "11.0" OR CUDA_VERSION VERSION_EQUAL "11.0")
Copy link
Member

Choose a reason for hiding this comment

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

Could you potentially gate https://github.com/facebookresearch/flashlight/blob/cc7f8073b719f1d7aba289ba0e50ec9e94dca5db/lib/CMakeLists.txt#L55 with this check as well so we don't download Cub if we've found CUDA 11?

Copy link
Author

Choose a reason for hiding this comment

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

I've tried to do that, but it didn't work, and I didn't have the time to dig into it.

Copy link
Author

Choose a reason for hiding this comment

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

Also, the latest version of FindCudaToolkit (which should be updated in flashlight CMakeLists.txt) doesn't compile cub library yet, so we need to do it by hand.

@@ -82,6 +82,11 @@ if (FL_LIBRARIES_USE_CUDA)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/..> # TODO(jacobkahn): fix me
)

# TODO For CUDA version 11 CUB doesn't have to be built
if (CUDA_VERSION VERSION_GREATER "11.0" OR CUDA_VERSION VERSION_EQUAL "11.0")
add_compile_definitions(THRUST_IGNORE_CUB_VERSION_CHECK)
Copy link
Member

Choose a reason for hiding this comment

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

Let's use target_compile_definitions on the lib target. We can make the modification PUBLIC so it works with libraries that link to lib.

Copy link
Author

Choose a reason for hiding this comment

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

done

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

2 similar comments
@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@alealv
Copy link
Author

alealv commented Oct 30, 2020

I took the time to update CMakeLists.txt of the warpctc project and submit a PR. It works but I think it will take time to be approved.

Because of that and because many of the project files used in flashlight were also outdated, I updated everything and made a PR for that.

Hence, that PR should be merge before this one.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

3 similar comments
@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@tlikhomanenko has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@tlikhomanenko
Copy link
Contributor

Could you fix the build?

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@tlikhomanenko has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@alealv
Copy link
Author

alealv commented Nov 4, 2020

Could you fix the build?

Fixed! [#225]

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

6 similar comments
@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@jacobkahn
Copy link
Member

@alealv — thanks for this.

I'm actually about to commit some changes that update our CMake minimum version to 3.10 which has much better CUDA support (as some of us have been discussing in another thread). Once that's in, it would be great if you could rebase on top of that, then I'll review this.

facebook-github-bot pushed a commit that referenced this pull request Nov 18, 2020
Summary:
Pull Request resolved: #266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- #215
- #225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
@facebook-github-bot
Copy link

@alealv has updated the pull request. You must reimport the pull request before landing.

@alealv
Copy link
Author

alealv commented Nov 19, 2020

Given that most of the changes were added in #266, I updated this PR to contain only the following change that is missing and stoping the master branch to compile if CUDAv11 is present:

@jacobkahn
Copy link
Member

Thanks for those updates @alealv — especially thanks for continuing to rebase on top of recent changes (things are changing quickly) :) - taking a look

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@jacobkahn has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Nov 20, 2020
Summary:
**Original Issue**: [#198] & [#213] & [#147]

- I updated [CMakeList.txt](https://github.com/facebookresearch/flashlight/blob/master/app/asr/third_party/warpctc/CMakeLists.txt) of third party library (warp-ctc)[https://github.com/baidu-research/warp-ctc]. The latest CMakeLists.txt  handles conditional compilation for architecture **compute_30** depending on CUDA version (CUDAv11 deprecates this architecture).
- The same is done for main [CMakeLists.txt]() file
- The [deprecation policy of CUDA has changed](https://docs.nvidia.com/deeplearning/cudnn/developer-guide/index.html#backward-compatibility). Therefore, the condition of **cudnnSetRNNDescriptor** used [here](https://github.com/facebookresearch/flashlight/blob/master/flashlight/autograd/backend/cuda/CudnnUtils.cpp#L281) needs to also include until version 8000 of cuDNN.
- Finally, with CUDA v11 [Nvidia cub](https://nvlabs.github.io/cub/) is included in CUDA toolkit, but because **flashlight** downloads and uses it's own version, it collides with _Thrust_ version. Hence,  **THRUST_IGNORE_CUB_VERSION_CHECK** must be define in if using CUDA v11

Pull Request resolved: #215

Reviewed By: padentomasello

Differential Revision: D24636876

Pulled By: jacobkahn

fbshipit-source-id: 76fac8c7f7672f4bb254420af3e1cbc6f3b187bc
@alealv alealv deleted the update_for_CUDA-11_and_cuDNN-8 branch November 20, 2020 07:53
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 25, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 27, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 27, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 27, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/text that referenced this pull request Mar 27, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/sequence that referenced this pull request Oct 13, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/sequence that referenced this pull request Oct 13, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/sequence that referenced this pull request Oct 13, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
jacobkahn added a commit to flashlight/sequence that referenced this pull request Oct 13, 2022
Summary:
Pull Request resolved: flashlight/flashlight#266

*Looking for comments here.* We don't have to go with this, but this is a draft of what this looks like. Helps us eliminate a lot of technical debt for now. We might be able to one day relax this restriction down the line again if we need to.

Update the minimum version of CMake required for flashlight to 3.10. 3.10 deprecates `FindCUDA.cmake` and adds first-class support for CUDA code in CMake as a project language.

Among other things, this diff:
- **Adds support for CUDA 11** and running flashlight code on Ampere with the CMake build
- **Adds support for building flashlight libraries, flashlight core, and flashlight apps as shared objects/libraries**. This makes shipping these libraries to other places easy.
- **Removes the `fl-libraries-cuda` and `warpctc` targets from flashlight**. These used to be separate CUDA libraries that were linked with and exported as additional targets
  - They flashlight exported targets more difficult to understand
  - They had the potential to conflict with other bits, i.e. another build of warpctc on the user's machine
  - CUDA kernels in flashlight libraries are now part of the `fl-libraries` target which makes it transparently easy to add new CUDA sources to flashlight, cc chaitan3
- CMake 3.10 automatically enables CUDA Separable Compilation, device linking, and PIC.
- Removes the backport of `cuda_add_library` that was necessary for older versions of CMake
- Builds warpctc as part of `fl-app-asr`
- Removes unused cruft in warpctc related to the warpctc CPU backend (which we will never use or build)
- Removes direct linking of `OpenMP` and `Threads` `IMPORTED` targets because they incorrectly propagate flags to nvcc which aren't interpreted properly. This is probably fixable in a better way.
- Gates the installation of CUB for CUDA versions <= 11 (this is necessary - including CUB with CUDA >= 11 breaks things)

Changes that need to be rebased (so they're Github auto-mentioned):
- flashlight/flashlight#215
- flashlight/flashlight#225

Reviewed By: tlikhomanenko

Differential Revision: D25013556

fbshipit-source-id: 8bbb56783dba07c0f2e7209748ddcd0e7c481db8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants