NVIDIA / NVIDIA/apex

cannot load FastLayerNorm from apex.contrib.layer_norm

Open
#1,256 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9k
Forks
1.5k
Avg merge
2d 4h
Merged PRs (30d)
3

Description

Environment: Pytorch 21.12 from NGC
build APEX from source pip install -v --disable-pip-version-check --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./

then in the script

from apex.contrib.layer_norm import FastLayerNorm

running report issue:

Traceback (most recent call last):
File "layernorm.py", line 14, in
from apex.contrib.layer_norm import FastLayerNorm
File "/workspace/apex/apex/contrib/layer_norm/init.py", line 1, in
from .layer_norm import FastLayerNorm
File "/workspace/apex/apex/contrib/layer_norm/layer_norm.py", line 5, in
import fast_layer_norm
ModuleNotFoundError: No module named 'fast_layer_norm'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported import with the provided PyTorch 21.12 environment and APEX build command. Start with apex/contrib/layer_norm/init.py and apex/contrib/layer_norm/layer_norm.py, then inspect how the fast_layer_norm module is built and exposed. Done means the documented installation allows from apex.contrib.layer_norm import FastLayerNorm without ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.