-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Performance Improvements to Main (#131)
* config updates and add timing * remove unneeded resorting for in memory training * simplify use of dst_sort * fix pipeling lock and isolate performMap to forward pass * bulk commit of pipeline, sampling, and loading performance improvements to main branch * gat support for both incoming and outgoing nbrs * remove timing code * fix argsort function arguments for compatibility with latest pytorch versions * update to latest tox version * apply autoformatter * fix linting errors * add dummy at::cuda classes to fix cpu-only builds * update python bindings * autoformat * update docs * fix merge * cleanup merge * remove pin memory call for CPU only build * autoformat * hide pinned memory calls in cpu code paths + autoformatter update * fix transfer_tensor * update pybind11, cmake fix, and for loop init in neighbor.cpp * only use -undefined dynamic_lookup for MacOS * only use -undefined dynamic_lookup for MacOS * fix transfer tensor for cpu tensors * autoformat * restructure cmake and fix dataloader init when using python API * autoformatter * revert to closest commit (9b5084f) with approximately working linux build * Fix linux build * add back all non cmake/pybind updates undone during revert of commit 370fe51 * fix rare edge case handling in neighborhood sampler (from artifact commit 64a0cea) * update marius/torch import order in docs/examples and fix perform map called twice bug * update marius/torch import order in src/python/tools/ * Skip flakey tests which periodically hang; update marius/torch import order for tests * attempt to fix test seg fault * autoformat * autoformat v2 * Update readme install instructions * readme typo --------- Co-authored-by: Roger Waleffe <[email protected]> Co-authored-by: Jason Mohoney <[email protected]> Co-authored-by: Jason <[email protected]> Co-authored-by: Roger Waleffe <[email protected]> Co-authored-by: waleffe <[email protected]>
- Loading branch information
1 parent
0a02b04
commit e10cade
Showing
73 changed files
with
708 additions
and
415 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,43 @@ | ||
# Sample dockerfile | ||
# Docker Installation | ||
|
||
Build an image with the name `marius` and the tag `example`: | ||
`docker build -t marius:gpu -f examples/docker/gpu_ubuntu/dockerfile examples/docker/gpu_ubuntu/` | ||
The following instructions install the necessary dependencies and build | ||
the system using Docker. We describe the installation for GPU-based machines, | ||
although Marius and MariusGNN can run on CPU only machines as well. | ||
|
||
Create and start a new container instance named `gaius` with: | ||
`docker run --name marius_gpu -itd marius:gpu` | ||
### Build and Install Instructions ### | ||
1. Check if docker is installed (`which docker`) and if not install it: https://docs.docker.com/engine/install/ | ||
2. Check if docker can access the GPUs by running `sudo docker run --gpus all nvidia/cuda:11.8.0-base-ubuntu22.04 nvidia-smi`. If this doesn't print the output of `nvidia-smi`, docker cannot access the CUDA driver on the host machine and you need to install the NVIDIA drivers for GPU support. | ||
3. Once the above succeeds, you should no longer need anything installed on the host machine. | ||
4. Create a docker image using the provided Dockerfile: `docker build -t image_name:image_tag gpu_ubuntu/.` | ||
5. Run the docker image: `docker run --gpus all -it image_name:image_tag bash`. It is often useful to link the current directory into the containers `/working_dir/` using the `-v` option (see below). | ||
6. Once the container is running, install and build the system: | ||
``` | ||
cd marius | ||
pip3 install . --no-build-isolation | ||
``` | ||
|
||
Run `docker ps` to verify the container is running | ||
**Full List of Example Commands for GPU Installation**: | ||
|
||
Start a bash session inside the container: | ||
`docker exec -it marius_gpu bash` | ||
``` | ||
CURRENT_DIR=`pwd` | ||
git clone https://github.com/marius-team/marius.git | ||
cd marius/examples/docker/ | ||
docker build -t marius:latest gpu_ubuntu/. | ||
docker run --gpus all -it -v $CURRENT_DIR:/working_dir/ marius:latest bash | ||
cd marius | ||
pip3 install . --no-build-isolation | ||
``` | ||
|
||
**CPU Only Installation**: If your machine does not have a GPU, remove the `--gpus all` from the docker run command in the GPU installation instructions. | ||
You can also optionally use the Dockerfile in `cpu_ubuntu/` rather than `gpu_ubuntu/`. | ||
|
||
**Installation Notes**: | ||
1. The installation requires Docker to have at least 8GB of memory to work with. This is generally satisfied by | ||
default, but if not (often on Mac), the `docker build` command may throw an error code 137. See | ||
[here](https://stackoverflow.com/questions/44533319/how-to-assign-more-memory-to-docker-container/44533437#44533437), | ||
[here](https://stackoverflow.com/questions/34674325/error-build-process-returned-exit-code-137-during-docker-build-on-tutum), and | ||
[here](https://stackoverflow.com/questions/57291806/docker-build-failed-after-pip-installed-requirements-with-exit-code-137) | ||
for StackOverflow threads on how to increase Docker available memory or fix this issue. The `pip3 install .` command | ||
may also cause Docker memory issues. Increase the memory available to Docker or decrease the number of threads used for building | ||
MariusGNN (to decrease the number of threads change `-j{}` in line 45 of `setup.py` to `-j1` for example). One thread | ||
should build with 8GB of memory but may take some time (~30mins). |
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
Oops, something went wrong.