Support multiple upstreams (make `upstream` a list)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #861 by @sayakpaul — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- cli, documentation, tooling
Research direction
Start in kernels/rust/lib.rs and trace Metadata.upstream through the Python binding and _rust.pyi, then inspect docs/source/cli-info.md, the CARD.md templates, and kernel-port. Done means multiple upstream URLs are supported, a single string remains accepted as one item, and CLI and CARD output render every upstream; add the cv-utils attribution separately if needed.
Written by the indexing model from the issue text.
Description
Motivation
Some kernels are put together from more than one upstream repository. For example, the cv-utils kernel appears to combine code from two sources:
- https://github.com/ronghanghu/torch_generic_nms (
generic_nms.cu, which in turn seems to come from torchvision) - https://github.com/ronghanghu/cc_torch (
connected_components.cu)
Right now upstream in the kernel metadata is a single Option<String> (see kernels/rust/lib.rs, where Metadata.upstream is exposed to Python as Optional[str]). Because of that, we can't properly credit kernels that have more than one upstream. We'll probably have more kernels like this in the future.
Proposal
- Make
upstreama list of URLs. - Backwards compatibility: keep accepting a single string and convert it to a one-element list.
- Update the places that consume the field:
- Python bindings:
Metadata.upstream/_rust.pyi, or add a new accessor if we don't want to break the existing API kernels infoCLI output (docs/source/cli-info.md)- CARD.md templates (
kernel-builder/src/init/templates/CARD.mdandexamples/kernels/*/CARD.md) so the## Upstreamsection renders every upstream kernel-port, if it records upstream info
- Python bindings:
Short-term
Until this lands, add the attribution for cv-utils to its card by hand.
Requested by Sayak Paul - Slack thread - Agent trace
- Dominant language
- Python
- Stars
- 781
- Forks
- 141
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 57
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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 huggingface/kernels
-
kernels-common: hash_variant loads entire file into memory, causing high RSS on large .so filesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
huggingface/kernels#956 ·
Maintainers usually reply within 1 day
-
kernels benchmark pulls from the old model repos and says every gpu is cpuPossibly taken @drbh claimed this 7 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
huggingface/kernels#914 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
huggingface/kernels#949 ·
Maintainers usually reply within 1 day
-
Add `kernels describe-api` to the "use layers" cookbookPossibly taken @ariG23498 claimed this 18 days ago. Open
huggingface/kernels#906 · 3 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Document kernels cache a bit moreMay be free again @sayakpaul claimed this 41 days ago, and no pull request is open. Open
huggingface/kernels#838 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in huggingface/kernels
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
pytest-dev/pyfakefs#1367 · 1 comment ·
Maintainers usually reply within 2 days
-
IFEvalG exclude_word_harder misses the keyword next to punctuation, at the start or end of the text, and in other letter casePossibly taken @damienen claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
allenai/open-instruct#2151 ·
Maintainers usually reply within 1 day
-
feat(plan): support convertorLabels and convertorAffinity in Plan resourcePossibly taken @AmenB claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RedHatQE/openshift-python-wrapper#2849 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 25 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
libnativeapi/nativeapi#21 ·