PyTorch 'meta' device needs per-device capabilities
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
Research direction
Start in array_api_compat.torch at capabilities(), then compare the signatures of default_dtypes() and dtypes(). Check the existing tests for capabilities and device handling; done means capabilities accepts device and reports boolean indexing and data-dependent shapes correctly for meta versus material devices.
Written by the indexing model from the issue text.
Description
PyTorch has a special device, meta, which is a dummy device with no underlying data. This is a very powerful testing tool.
However, PyTorch has not implemented special support for unknown shapes just for this device. As a result, unique etc. fail.
Proposal
Change capabilities() to capabilities(*, device=None), matching the signature of default_dtypes() and dtypes().
Change array_api_compat.torch:
def capabilities(*, device=None):
device = torch.get_default_device() if device is None else torch.device(device)
is_material = device.type != "meta"
return {
"boolean indexing": is_material,
"data-dependent shapes": is_material,
"max dimensions": 64,
}
- Dominant language
- Python
- Stars
- 281
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from data-apis/array-api
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Maintenance
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in data-apis/array-api
Similar issues
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/cloudstack#14222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100