modular / modular/modular

[BUG] `DeviceContext.device_info.name` misidentifies 4090m as L4

Open
#3,992 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug mojo mojo-repo
Dominant language
Mojo
Stars
29.8k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Bug description
Actual behavior

DeviceContext(api="cuda").device_info.name is "L4" on a 4090 mobile card.

Expected behavior

I'm not sure if you are doing "closest match rounding down", since there aren't any AD103 cards you support, and L4 a the supported AD104 card, but it was surprising to see that classification. If this is intentional, I think it would be less confusing to see Name: ... 4090 ... and Closest Supported: L4.

Steps to reproduce
(Mojo) ohilyard@ohilyard-laptop:~/Documents/projects/mojo/stdlib/mojo/scratch$ mojo
Welcome to Mojo! 🔥

Expressions are delimited by a blank line.
Type `:quit` to exit the REPL and `:mojo help` for further assistance.

  1> from gpu.host.device_context import DeviceContext 
  2. var cuda = DeviceContext(api="cuda") 
  3. print(cuda.device_info.name) 
  4.  
L4
(DeviceContext) cuda = {
  (UnsafePointer[_DeviceContextCpp]) _handle = {
    (pointer<_gpu::_host::_device_context::__DeviceContextCpp>) address = 0x00005621356c8570
  }
}
  4> ^D
(Mojo) ohilyard@ohilyard-laptop:~/Documents/projects/mojo/stdlib/mojo/scratch$ nvidia-smi -L
GPU 0: NVIDIA GeForce RTX 4090 Laptop GPU (UUID: <REMOVED>)
System information

gpu-open driver 565.77
cuda 12.7
mojo 25.1.0.dev2025020205

Contributor guide

Open the contributing guide

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

Start by reproducing the report with DeviceContext(api="cuda").device_info.name and compare it with nvidia-smi -L on the reported RTX 4090 Laptop GPU. Determine how the device is classified and define the result so the actual GPU name is not misleadingly reported as L4; verify the corrected output against this reproduction.

Written by the indexing model from the issue text.

Assessment

Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.