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

Support mask of broadcast, consts (arange, zeros, ...) #3472

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

Conversation

juliuskunze
Copy link
Contributor

@juliuskunze juliuskunze commented Jun 17, 2020

Adds support for mask of broadcast (fixing #2769) and constant operations, as well as mask(squeeze) and preparations for mask(where).

It introduces four new lax primitives (iota_p, eye_p, delta_p, tri_p), all without inputs (= constants). Together with broadcast_in_dim_p, each of these requires a target shape (or size) parameter. This shape can be polymorphic during masking. In that case, abstract evaluation of these primitives cannot return a ConcreteArray. To solve this, their abstract_eval function is modified to return a ShapedArray with polymorphic shape.

mask and shapecheck now require omnistaging, which is default since #4038. @mattjj
Omnistaging broke mask(jit) and therefore mask(where) and mask(pad), see TODOs in tests. Do you already have a plan to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants