OpenGVLab / OpenGVLab/Ask-Anything
sequential ` for samples in batch` loop in Videochat2 is slow, any ways to parallalize it ?
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 268
- PR merge metrics
- No merged PRs in 30d
Description
Hi, dear all:
I noticed a sequential for loop in videochat2_it.py forward function:
As most of tensor computation is parallel, any good idea to implement the for loop parallel?
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by reading the forward function in video_chat2/models/videochat2_it.py around lines 240-288 and measure the current sequential loop. Compare any proposed approach against the existing behavior and timing; the work is done when a safe parallelization strategy is demonstrated to improve performance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100