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

inference: thread lattice through memoryop type check #52773

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Jan 6, 2024

We would probably need to backport similar changes to 1.10 too.

xref: aviatesk/JET.jl#589

We would probably need to backport similar changes to 1.10 too.

xref: aviatesk/JET.jl#589
# Check that we can determine the element type
isa(memtype, DataType) || return false
elemtype_expected = memoryref_elemtype(memtype)
elemtype_expected === Union{} && return false
# Check that the element type is compatible with the element we're assigning
⊑ = Core.Compiler.:⊑(𝕃)
Copy link
Member

Choose a reason for hiding this comment

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

Aren't we already in Core.Compiler here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a hack to use the same symbol as a binary operator in the local context.

Copy link
Member

Choose a reason for hiding this comment

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

A little ugly, but I guess I don't care.

Copy link
Member

Choose a reason for hiding this comment

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

Should be just Compiler.⊑ then, since Core.Compiler might be a different module from this

Copy link
Member Author

Choose a reason for hiding this comment

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

tfuncs.jl is loaded only within Core.Compiler, but let's make this clean in another PR.

Copy link
Member

Choose a reason for hiding this comment

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

I often load other Compilers that aren't the one in Core

@aviatesk aviatesk merged commit bac95cc into master Jan 7, 2024
7 checks passed
@aviatesk aviatesk deleted the avi/memoryop-lattice branch January 7, 2024 01:36
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