Lightning-AI / Lightning-AI/lightning-thunder

test_grad.py assumes all ops in OpInfo database can be run on CPU

Open
#199 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

testing
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

`_generate_supported_op_list` tries to run all ops in the opinfo db to filter ops for grad test.

However, `Tensor.cuda` requires CUDA runtime to be available. We have to add this op to the skip list (even when it should work when CUDA runtime is available).

See : https://github.com/Lightning-AI/lightning-thunder/pull/181#issuecomment-2057250507

cc @apaz-cli

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

Start in test_grad.py at _generate_supported_op_list, which probes operations from the OpInfo database for gradient tests. Check the existing skip list and run the relevant grad test; done means Tensor.cuda is excluded from CPU probing while the remaining operations are still filtered correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.