Skip to content

[PyTorch] Fix whl build for v1.8 - #1050

Closed
viclzhu wants to merge 13 commits into
NVIDIA:release_v1.8from
viclzhu:fix-whl-build
Closed

[PyTorch] Fix whl build for v1.8#1050
viclzhu wants to merge 13 commits into
NVIDIA:release_v1.8from
viclzhu:fix-whl-build

Conversation

@viclzhu

@viclzhuviclzhu commented Jul 26, 2024

Copy link
Copy Markdown

Description

Hi, when trying to install TransformerEngine v1.8, I encountered an invalid redeclaration error, and I do not see this when installing v1.7 or main. Removing the half definition in userbuffers.cu appears to resolve the compilation issue, though I'm not sure what is causing the actual root issue, as I see main/v1.7 has the definition and I was able to install that version, with the same cuDNN version (8.9.7.29).

Any ideas what could be happening here? Thanks!

Install command:
MAX_JOBS=16 pip install git+https://github.com/NVIDIA/TransformerEngine.git@v1.8

Error:

 /opt/conda/include/cuda_fp16.hpp(2723): error: invalid redeclaration of type name "nv_bfloat16" (declared at line 2837 of /opt/conda/include/cuda_bf16.hpp)
typedef __half nv_bfloat16;
^
1 error detected in the compilation of "/tmp/pip-req-build-_zyeql3z/transformer_engine/pytorch/csrc/userbuffers/userbuffers.cu".

Environment:

  • PyTorch==2.3.1
  • CUDA==12.1
  • cuDNN==8.9.7.29

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refractor

Changes

Please list the changes introduced in this PR:

  • Removed half definition in userbuffers.cu.

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

ptrendxand others added 13 commits May 20, 2024 08:58
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
* Calibration fix
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* Lint fix
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
---------
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-authored-by: Pawel Gadzinski <pgadzinski@nvidia.com>
…A#860)
replaced deprecated pkg_resources with packaging
Signed-off-by: Alp Dener <adener@nvidia.com>
* added alignment requirements for CuBLAS heuristics
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
* minor rewords
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
* added unit test for gemm with unaligned inputs
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
* added pytest skip if fp8 is not available
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
* changed offset so that it has alignment with 128
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
---------
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
TE checkpoint now preserves the torch autocast context from the forward pass during the recompute phase
Signed-off-by: Alp Dener <adener@nvidia.com>
allow bias support for sm80/86/89 for cuDNN 9+
Signed-off-by: Charlene Yang <8636796+cyanguwa@users.noreply.github.com>
* Fixed the shape mismatching issue in MLP.
Signed-off-by: Ming Huang <mingh@nvidia.com>
* Add a corresponding test
Signed-off-by: Ming Huang <mingh@nvidia.com>
---------
Signed-off-by: Ming Huang <mingh@nvidia.com>
Co-authored-by: Phuong Nguyen <36155692+phu0ngng@users.noreply.github.com>
* Use correct FP8 group in multi-GPU docs
FP8 process group should be tensor-parallel group
Signed-off-by: Tim Moon <tmoon@nvidia.com>
* Synchronize FP8 scales over world group in multi-GPU docs
Signed-off-by: Tim Moon <tmoon@nvidia.com>
---------
Signed-off-by: Tim Moon <tmoon@nvidia.com>
Make sure RoPE frequencies are in FP32
Signed-off-by: Tim Moon <tmoon@nvidia.com>
* Change the documentation footer
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
* Update docs toolchain versions
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
---------
Signed-off-by: Przemek Tredak <ptredak@nvidia.com>
* Llama 3 update
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* Times update
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* Times update
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* utils.py fix
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* utils.py fix
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* utils.py fix
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
* update te llama tutorial to allow running with llama 3 weights
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* small fixes
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* small fix
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* small fix
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* add llama 3 vs llama 2 distinctions
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* paraphrasing and corrected facts
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* fix
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
* fix
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
---------
Signed-off-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Signed-off-by: Sudhakar Singh <sudhakars@nvidia.com>
Co-authored-by: Pawel Gadzinski <pgadzinski@nvidia.com>
Co-authored-by: Sudhakar Singh <sudhakars@nvidia.com>
Signed-off-by: Victor Zhu <victorvctr.zh@gmail.com>
@viclzhuviclzhu changed the title [PyTorch] Fix whl build[PyTorch] Fix whl build for v1.8Jul 26, 2024
@timmoon10

Copy link
Copy Markdown
Member

Thanks for the bugfix, but this should already be fixed with #949 (included in the main and release_v1.9 branches). See #560 for a more detailed description of the bug.

Sign up for freeto 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.

8 participants

@viclzhu@timmoon10@ptrendx@pggPL@denera@phu0ngng@cyanguwa@mingxu1067