Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Implement broadcast_to function #782

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mtsokol
Copy link
Collaborator

@mtsokol mtsokol commented Sep 30, 2024

Hi @hameerabbasi,

This PR adds broadcast_to Array API function.

It it only broadcasts missing dimensions, for 1-size dimension it can't broadcast as it's a limitation of linalg.broadcast in MLIR.

It also provides some simple logic for inferring output sparse format.

@mtsokol mtsokol self-assigned this Sep 30, 2024
Copy link

codspeed-hq bot commented Sep 30, 2024

CodSpeed Performance Report

Merging #782 will improve performances by ×2.2

Comparing broadcast_to-func (e46cd64) with main (fbdd5c7)

Summary

⚡ 1 improvements
✅ 339 untouched benchmarks

Benchmarks breakdown

Benchmark main broadcast_to-func Change
test_index_fancy[side=100-rank=1-format='coo'] 1,427.5 µs 640.2 µs ×2.2

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.

1 participant