Skip to content
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

AssertionError: Device compute capability 8.9 or higher required for FP8 execution. #1159

Open
kamrul-NSL opened this issue Sep 5, 2024 · 1 comment

Comments

@kamrul-NSL
Copy link

kamrul-NSL commented Sep 5, 2024

import torch
import transformer_engine.pytorch as te
from transformer_engine.common import recipe

# Set dimensions.
in_features = 768
out_features = 3072
hidden_size = 2048
print("Initialization Complete!")
# Initialize model and inputs.
model = te.Linear(in_features, out_features, bias=True)
inp = torch.randn(hidden_size, in_features, device="cuda")

# Create an FP8 recipe. Note: All input args are optional.
fp8_recipe = recipe.DelayedScaling(margin=0, fp8_format=recipe.Format.E4M3)

# Enable autocasting for the forward pass
with te.fp8_autocast(enabled=True, fp8_recipe=fp8_recipe):
    out = model(inp)

loss = out.sum()
loss.backward()

print("Done!!")

I am trying to use fp8 for an experiment purpose . I installed all the necessary packages according to Nvidia's instruction. But got this issues.

 assert fp8_available, reason_for_no_fp8
AssertionError: Device compute capability 8.9 or higher required for FP8 execution.

In my machine I am using NVIDIA GeForce RTX 3090. And it contains nvidia-smi --query-gpu=compute_cap --format=csv
compute_cap
8.6

Is it possible to use fp8 on 3090 GPU?

@ptrendx
Copy link
Member

ptrendx commented Sep 5, 2024

RTX 3090 is using Ampere architecture, which does not have support for FP8 execution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants