Skip to content

Define kernel dialect and kernel.eval_chebyshev op - #3282

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_958763397
Open

Define kernel dialect and kernel.eval_chebyshev op#3282
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_958763397

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Define kernel dialect and kernel.eval_chebyshev op

This is change 1/8 demonstrating a high-level FHE kernel preservation for eval_chebyshev (and later, linear_transform). It defines the kernel dialect and eval_chebyshev op, along with a placeholder for the level consumption formula.

@copybara-service
copybara-service Bot force-pushed the test_958763397 branch 4 times, most recently from acf1cc0 to b8e5afb Compare August 5, 2026 03:05
This is change 1/8 demonstrating a high-level FHE kernel preservation for eval_chebyshev (and later, linear_transform). It defines the `kernel` dialect and `eval_chebyshev` op, along with a placeholder for the level consumption formula.

PiperOrigin-RevId: 958763397

@AlexanderViand AlexanderViand left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the kernel dialect name 👍

Comment on lines +31 to +32
Builtin_FloatAttr:$domain_lower,
Builtin_FloatAttr:$domain_upper

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure we want to allow this on anything other than [-1,1] (i.e., drop the domain attr here and make it explicitly always [-1,1])?

Some backends (Cheddar, iirc) only support [-1,1] in their API, and for the others it's simply a convenience thing of not having to do the rescale/shift manually. For the compiler, it might be nicer to explicitly emit those ops so they can take part in CSE/etc?

Comment thread lib/Dialect/Kernel/IR/KernelOps.cpp
@mdgrs

mdgrs commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

I like the kernel dialect name 👍

however, it is not registered in heir-lsp :(

@j2kun

j2kun commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

I like the kernel dialect name 👍

however, it is not registered in heir-lsp :(

I'll add that 🙃

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.

3 participants