NVIDIA/apex hiện có 9.0k sao trên GitHub, viết chủ yếu bằng Python. A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This repository holds NVIDIA-maintained utilities to streamline mixed precision and distributed training in Pytorch.
Some of the code here will be included in upstream Pytorch eventually.
The intent of Apex is to make up-to-date utilities available to users as quickly as possible.
Installation
Each apex.contrib module requires one or more install options other than --cpp_ext and --cuda_ext.
Note that contrib modules do not necessarily support stable PyTorch releases, some of them might only be compatible with nightlies.
Containers
NVIDIA PyTorch Containers are available on NGC: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch.
The containers come with all the custom extensions available at the moment.
See the NGC documentation for details such as:
how to pull a container
how to run a pulled container
release notes
From Source
To install Apex from source, we recommend using the nightly Pytorch obtainable from https://github.com/pytorch/pytorch.
The latest stable release obtainable from https://pytorch.org should also work.
We recommend installing Ninja to make compilation faster.
Linux
For performance and full functionality, we recommend installing Apex with CUDA and C++ extensions using environment variables:
Using Environment Variables (Recommended)
git clone https://github.com/NVIDIA/apex
cd apex
# Build with core extensions (cpp and cuda)
APEX_CPP_EXT=1 APEX_CUDA_EXT=1 pip install -v --no-build-isolation .
# To build with additional extensions, specify them with environment variables
APEX_CPP_EXT=1 APEX_CUDA_EXT=1 APEX_FUSED_CONV_BIAS_RELU=1 pip install -v --no-build-isolation .
# To build all contrib extensions at once
APEX_CPP_EXT=1 APEX_CUDA_EXT=1 APEX_ALL_CONTRIB_EXT=1 pip install -v --no-build-isolation .
To reduce the build time, parallel building can be enabled:
Fused kernels required to use apex.optimizers.FusedAdam.
Fused kernels required to use apex.normalization.FusedLayerNorm and apex.normalization.FusedRMSNorm.
Fused kernels that improve the performance and numerical stability of apex.parallel.SyncBatchNorm.
Fused kernels that improve the performance of apex.parallel.DistributedDataParallel and apex.amp.
DistributedDataParallel, amp, and SyncBatchNorm will still be usable, but they may be slower.
[Experimental] Windows
pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" . may work if you were able to build Pytorch from source
on your system. A Python-only build via pip install -v --no-cache-dir . is more likely to work.
If you installed Pytorch in a Conda environment, make sure to install Apex in that same environment.
Custom C++/CUDA Extensions and Install Options
If a requirement of a module is not met, then it will not be built.
Module Name
Environment Variable
Install Option
Misc
apex_C
APEX_CPP_EXT=1
--cpp_ext
amp_C
APEX_CUDA_EXT=1
--cuda_ext
syncbn
APEX_CUDA_EXT=1
--cuda_ext
fused_layer_norm_cuda
APEX_CUDA_EXT=1
--cuda_ext
apex.normalization
mlp_cuda
APEX_CUDA_EXT=1
--cuda_ext
scaled_upper_triang_masked_softmax_cuda
APEX_CUDA_EXT=1
--cuda_ext
generic_scaled_masked_softmax_cuda
APEX_CUDA_EXT=1
--cuda_ext
scaled_masked_softmax_cuda
APEX_CUDA_EXT=1
--cuda_ext
fused_weight_gradient_mlp_cuda
APEX_CUDA_EXT=1
--cuda_ext
Requires CUDA>=11
permutation_search_cuda
APEX_PERMUTATION_SEARCH=1
--permutation_search
apex.contrib.sparsity
bnp
APEX_BNP=1
--bnp
apex.contrib.groupbn
xentropy
APEX_XENTROPY=1
--xentropy
apex.contrib.xentropy
focal_loss_cuda
APEX_FOCAL_LOSS=1
--focal_loss
apex.contrib.focal_loss
fused_index_mul_2d
APEX_INDEX_MUL_2D=1
--index_mul_2d
apex.contrib.index_mul_2d
fused_adam_cuda
APEX_DEPRECATED_FUSED_ADAM=1
--deprecated_fused_adam
apex.contrib.optimizers
fused_lamb_cuda
APEX_DEPRECATED_FUSED_LAMB=1
--deprecated_fused_lamb
apex.contrib.optimizers
fast_layer_norm
APEX_FAST_LAYER_NORM=1
--fast_layer_norm
apex.contrib.layer_norm. different from fused_layer_norm
transducer_joint_cuda
APEX_TRANSDUCER=1
--transducer
apex.contrib.transducer
transducer_loss_cuda
APEX_TRANSDUCER=1
--transducer
apex.contrib.transducer
cudnn_gbn_lib
APEX_CUDNN_GBN=1
--cudnn_gbn
Requires cuDNN>=8.5, apex.contrib.cudnn_gbn
peer_memory_cuda
APEX_PEER_MEMORY=1
--peer_memory
apex.contrib.peer_memory
nccl_p2p_cuda
APEX_NCCL_P2P=1
--nccl_p2p
Requires NCCL >= 2.10, apex.contrib.nccl_p2p
fast_bottleneck
APEX_FAST_BOTTLENECK=1
--fast_bottleneck
Requires peer_memory_cuda and nccl_p2p_cuda, apex.contrib.bottleneck
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/NVIDIA/apex là nguồn chính thức.
NVIDIA/apex có bao nhiêu sao?
NVIDIA/apex có 9.0k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/NVIDIA/apex. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
NVIDIA/apex có phải mã nguồn mở không?
Có — NVIDIA/apex phát hành theo license BSD-3-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/NVIDIA/apex.
NVIDIA/apex có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho NVIDIA/apex. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
NVIDIA/apex là gì?
NVIDIA/apex (NVIDIA/apex) là dự án Python trên GitHub. Theo mô tả gốc: A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
Đọc đầy đủ README ở tab phía trên.
apex có đáng để bạn bỏ thời gian?
ChatGPT, Claude và Perplexity đều đọc được trang này. Hỏi thử xem họ nghĩ gì về apex.