-
Notifications
You must be signed in to change notification settings - Fork 83
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
fix(python): change to_bagua_tensor
API to support PyTorch 1.10
#338
Merged
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
de7df6e
feat(python, core): support mutable bucket tensors (#271)
wangraying faf74c8
chore: update
NOBLES5E f2af5d1
chore: update
NOBLES5E 6c485ec
chore: update
NOBLES5E 1817fb8
chore: update
NOBLES5E aeb9b3c
chore: update
NOBLES5E 452448d
chore: update
NOBLES5E 6db0086
chore: update
NOBLES5E 92eda6f
Merge branch 'master' into remove-to-bagua-tensor
NOBLES5E 50f9cd8
update
NOBLES5E 6523df1
update
NOBLES5E 145fd62
Update tensor.py
NOBLES5E e55a4b2
Update tensor.py
NOBLES5E File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-devel | ||
|
||
RUN apt-get update && apt-get install -y curl software-properties-common wget sudo | ||
RUN add-apt-repository ppa:git-core/ppa -y | ||
RUN sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf && update-ca-certificates | ||
RUN curl -sSf https://apt.kitware.com/kitware-archive.sh | sh | ||
RUN apt-get update && apt-get install -y git cmake | ||
RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y | ||
ENV PATH=/root/.cargo/bin:${PATH} | ||
RUN cargo install mdbook mdbook-linkcheck mdbook-katex mdbook-open-on-gh | ||
|
||
RUN yes | python3 -m pip install -U setuptools wheel build pip | ||
|
||
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64/stubs/:/usr/local/lib64:/usr/local/lib" | ||
ENV LIBRARY_PATH="/usr/local/cuda/lib64/stubs/:/usr/local/lib64:/usr/local/lib" | ||
ENV PKG_CONFIG_PATH="/usr/local/cuda/pkgconfig/" | ||
ENV CUDA_LIBRARY_PATH="/usr/local/cuda/lib64/" | ||
|
||
|
||
# OpenMPI version 4.0.3 | ||
RUN apt-get update -y && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
bzip2 \ | ||
file \ | ||
hwloc \ | ||
libnuma-dev \ | ||
make \ | ||
openssh-client \ | ||
perl \ | ||
tar \ | ||
wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.3.tar.bz2 && \ | ||
mkdir -p /var/tmp && tar -x -f /var/tmp/openmpi-4.0.3.tar.bz2 -C /var/tmp -j && \ | ||
cd /var/tmp/openmpi-4.0.3 && ./configure --disable-getpwuid --disable-oshmem --enable-fortran --enable-mca-no-build=btl-uct --enable-orterun-prefix-by-default --with-cuda --without-verbs && \ | ||
make -j$(nproc) && \ | ||
make -j$(nproc) install && \ | ||
rm -rf /var/tmp/openmpi-4.0.3 /var/tmp/openmpi-4.0.3.tar.bz2 && cd - | ||
|
||
# hwloc | ||
RUN mkdir -p /var/tmp && wget -q -nc --no-check-certificate -P /var/tmp https://download.open-mpi.org/release/hwloc/v2.5/hwloc-2.5.0.tar.bz2 && \ | ||
mkdir -p /var/tmp && tar -x -f /var/tmp/hwloc-2.5.0.tar.bz2 -C /var/tmp -j && \ | ||
cd /var/tmp/hwloc-2.5.0 && ./configure && \ | ||
make -j$(nproc) && \ | ||
make -j$(nproc) install && \ | ||
rm -rf /var/tmp/hwloc* && cd - | ||
|
||
# Redis | ||
RUN add-apt-repository ppa:redislabs/redis | ||
RUN apt-get update && apt-get install -y redis | ||
RUN yes | python3 -m pip install -U redis | ||
|
||
RUN mkdir /bagua | ||
COPY examples/ /bagua/examples | ||
COPY ./ /var/tmp/bagua | ||
RUN cd /var/tmp/bagua && python3 -m pip install . && cd - && rm -rf /var/tmp/bagua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[blackfmt] reported by reviewdog 🐶