Skip to content

Add activation and dilation to conv1d - #1979

Merged
jordimas merged 4 commits into
OpenNMT:masterfrom
sssshhhhhh:conv
Jan 19, 2026
Merged

jordimas merged 4 commits into
OpenNMT:masterfrom
sssshhhhhh:conv

Conversation

@sssshhhhhh

Copy link
Copy Markdown
Contributor
  • Optional activation for conv1d to fuse with bias
  • Dilation support for conv1d gpu
  • Use gemm_batch_strided to run each conv1d group in a single kernel

@jordimas

Copy link
Copy Markdown
Collaborator

Thanks. Have you done any benchmark on how performance is impacted?

@sssshhhhhh

Copy link
Copy Markdown
Contributor Author
bias bias+gelu none bsz1
new 0.868059 0.869294 0.798557 0.20549
old 1.04657 1.10023 0.970503 0.205125

fp16 [4,1280,3000]*[1280,1280,3]=[4,1280,1500]
Same to a little faster

@sssshhhhhh

Copy link
Copy Markdown
Contributor Author

Optimised im2col a bit, no bias/gelu down to 0.694081

@jordimas

Copy link
Copy Markdown
Collaborator

Thanks for your contribution

@jordimas
jordimas merged commit a1ce077 into OpenNMT:master Jan 19, 2026
16 checks passed
@sssshhhhhh
sssshhhhhh deleted the conv branch January 23, 2026 07:40
Lanurence666 pushed a commit to Lanurence666/CTranslate2_backport_py38 that referenced this pull request May 23, 2026
veilnetwork pushed a commit to veilnetwork/CTranslate2 that referenced this pull request Aug 27, 2026
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