Chirag Jain 50896ec574 Make nvcc threads configurable via environment variable (#885) | 9 місяців тому | |
---|---|---|
.. | ||
README.md | 1 рік тому | |
interface.cpp | 2 роки тому | |
setup.py | 9 місяців тому | |
xentropy_kernel.cu | 2 роки тому |
This CUDA extension implements optimized cross-entropy loss, adapted from Apex's Xentropy. We make it work for bfloat16 and support in-place backward to save memory.
It has only been tested on A100s.
cd csrc/xentropy && pip install .
As of 2023-09-15, this extension is no longer used in the FlashAttention repo. We've instead switched to a Triton-based implementation. See the CrossEntropyLoss module for more details.