Skip to content

Fail to install sparse attention and cpu-adam #459

Closed

Description

@szhengac

When I used install.sh, I received the following warnings:

`[WARNING] fused lamb is NOT installed.

[WARNING] transformer kernels are NOT installed.

[WARNING] sparse attention is NOT installed.

[WARNING] cpu-adam (used by ZeRO-offload) is NOT installed.`

After changing the wheel installation to pure pip installation, the fused lamb and transformer kernel can be installed. But I still fail to install the sparse attention and cpu-adam.

Activity

  1. ollmer commented on Oct 6, 2020

    @ollmer

    Hi! I have the same issue after installing with install.sh in virtual environment

  2. tjruwase commented on Oct 6, 2020

    @tjruwase
    Contributor

    @ollmer Can you please share the exact command you ran?

  3. ollmer commented on Oct 6, 2020

    @ollmer

    ./install.sh
    Tail of the output:

    Installing collected packages: deepspeed
    Successfully installed deepspeed-0.3.0+6717638
    Removed build tracker: '/tmp/pip-req-tracker-kxo93qrf'
    [SUCCESS] deepspeed successfully imported.
    [INFO] torch install path: ['/home/olg/venv/lib/python3.6/site-packages/torch']
    [INFO] torch version: 1.5.0+cu101, torch.cuda: 10.1
    [INFO] deepspeed install path: ['/home/olg/venv/lib/python3.6/site-packages/deepspeed']
    [INFO] deepspeed info: 0.3.0+6717638, 6717638, master
    [SUCCESS] apex extensions successfully installed
    [INFO] using new-style apex
    [SUCCESS] fused lamb successfully installed.
    [SUCCESS] transformer kernels successfully installed.
    [WARNING] sparse attention is NOT installed.
    [WARNING] cpu-adam (used by ZeRO-offload) is NOT installed.
    Installation is successful
    `

  4. tjruwase commented on Oct 6, 2020

    @tjruwase
    Contributor

    Thanks for sharing. Now it seems installation is successful, although cpu-adam and sparse-attention are not installed. Those two are not installed by default because of dependencies. So two questions:

    1. Does this mean the installation error is not reproducible?
    2. Can you test if the installation works for you?
  5. ollmer commented on Oct 6, 2020

    @ollmer

    It's more like what should i do to get sparse attention module and cpu-adam installed? Because i want to do some experiments with both of them. My expectation was that all of deepspeed optimizations would be available after install by default.

  6. tjruwase commented on Oct 6, 2020

    @tjruwase
    Contributor

    Got it. Unfortunately, sparse-attention and cpu-adam have extra requirements that could create installation issues and so they are disabled by default to reduce the number of users who run into these issues.

    To enable cpu-adam please

    1. Install cpufeature: pip install cpufeature

    2. Run DS_CPU_ADAM=1 ./install.sh -n
      The -n is for incremental installation so that it does not rebuild existing binaries.

    My colleague will respond with installation details for sparse-attention.

  7. ollmer commented on Oct 6, 2020

    @ollmer

    Thanks for instructions!

    pip install cpufeature

    This one already has been installed.

    DS_CPU_ADAM=1 ./install.sh -n

    I've done it, it takes less than a minute, but the result is the same, unfortunately:

    Installing collected packages: deepspeed
    Successfully installed deepspeed-0.3.0+6717638
    Removed build tracker: '/tmp/pip-req-tracker-5vxjp6gi'
    [SUCCESS] deepspeed successfully imported.
    [INFO] torch install path: ['/home/jovyan/venv/lib/python3.6/site-packages/torch']
    [INFO] torch version: 1.5.0+cu101, torch.cuda: 10.1
    [INFO] deepspeed install path: ['/home/jovyan/venv/lib/python3.6/site-packages/deepspeed']
    [INFO] deepspeed info: 0.3.0+6717638, 6717638, master
    [SUCCESS] apex extensions successfully installed
    [INFO] using new-style apex
    [SUCCESS] fused lamb successfully installed.
    [SUCCESS] transformer kernels successfully installed.
    [WARNING] sparse attention is NOT installed.
    [WARNING] cpu-adam (used by ZeRO-offload) is NOT installed.
    Installation is successful

  8. arashashari commented on Oct 6, 2020

    @arashashari
    Contributor

    And for installing Sparse Attention, you have the following dependencies:

    • llvm: sudo apt-get install llvm-9-dev
    • cmake: sudo apt-get install cmake
    • triton>=0.2.2: this will be handled by the installer script, if there was any issue, please install it through pip

    Then you need to set the install flag:
    DS_BUILD_SPARSE_ATTN=1 (for sparse attention)
    DS_BUILD_CPU_ADAM=1 (for cpu adam)

    and finally run ./install.sh

    Please update us on the result.

  9. tjruwase commented on Oct 6, 2020

    @tjruwase
    Contributor

    @arashashari Thanks for fixing my typo on DS_BUILD_CPU_ADAM

  10. ollmer commented on Oct 6, 2020

    @ollmer

    Thanks for help guys! I've managed to install cpu adam, but for now i can't install llvm-9-dev with apt due to environment limitations. Will try to build it locally from source

  11. arashashari commented on Oct 6, 2020

    @arashashari
    Contributor

    @ollmer: great. We will keep the issue open. Please keep us updated and we will close it when you were able to successfully install SA as well.

  12. szhengac commented on Oct 6, 2020

    @szhengac
    ContributorAuthor

    I failed to import triton after pip install it. So I have to compile it from source with several other dependencies. After these, I can install sparse attention successfully.

  13. ollmer commented on Oct 8, 2020

    @ollmer

    @arashashari: i have to wait for a few days for the llvm availability on our platform. I will let you know when i'll try again, thanks!

  14. ollmer commented on Oct 16, 2020

    @ollmer

    @arashashari: I've managed to get llvm and everything installs and works smoothly now. Thanks for help!

  15. arashashari commented on Oct 16, 2020

    @arashashari
    Contributor

    @ollmer: fantastic, happy to hear it. I close the issue now.

  16. VardanyanS commented on Feb 17, 2021

    @VardanyanS

    I've managed to get llvm and everything installs and works smoothly now

    Hi, I have the same problem, could you please explain, how you got llvm?

  17. ollmer commented on Feb 18, 2021

    @ollmer

    My cloud provider just build the base image with it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions