Skip to content

Conversation

@krystophny
Copy link

This is a small addition to PR #22 since I have been changing this in parallel. In this variant, triton v2 is still working too, and Linux OS is correctly added again in requirements (whisper upstream has that too). If fine, please merge after #22 .

tokyovigilante and others added 2 commits October 25, 2025 21:29
Apparently kernel.src cannot be directly assigned in v3, so store src
in a local copy and modify that one before applying the updates.

Tested on simulated streaming audio locally.

see openai/whisper#2597
The previous commit added Triton 3.x support but broke backward
compatibility with Triton 2.x by requiring triton>=3.0.0.

This commit restores compatibility with both versions by following
the upstream OpenAI Whisper approach:
- Use hasattr() to detect which API is available
- Call _unsafe_update_src() + hash reset for Triton 3.0-3.1
- Fall back to kernel.src for Triton 2.x
- Restore triton>=2.0.0 requirement (supports both 2.x and 3.x)

This matches the implementation in openai/whisper and addresses
the maintainer feedback to follow upstream more closely.

Builds on: ufal#22
See: openai/whisper#2597
@tokyovigilante
Copy link

@krystophny thanks for posting this, mine is more of a hack for Debian 13, your PR should probably be accepted over mine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants