Skip to content

Fix anytracedarray override #1290

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

Merged
merged 4 commits into from
May 16, 2025
Merged

Fix anytracedarray override #1290

merged 4 commits into from
May 16, 2025

Conversation

wsmoses
Copy link
Member

@wsmoses wsmoses commented May 16, 2025

hopefully fixes the sort issue

Fix #1231, fix #1286.

@wsmoses wsmoses requested review from mofeing and avik-pal May 16, 2025 15:51
Copy link
Collaborator

@mofeing mofeing left a comment

Choose a reason for hiding this comment

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

Im out of town and won't be able to access my laptop until Sunday, but if methods(sort, (Vector{Union{}},)) doesn't show the reactant method and sort(Vector{Union{}}()) doesn't crash, then everything should be fine.

@wsmoses
Copy link
Member Author

wsmoses commented May 16, 2025

indeed all is well:

julia> using Reactant
Precompiling Reactant finished.
  1 dependency successfully precompiled in 16 seconds. 55 already precompiled.

julia> Vector{Union{}} <: Reactant.AnyTracedRArray
false

julia> methods(sort, (Vector{Union{}},))
# 1 method for generic function "sort" from Base:
 [1] sort(v::AbstractVector; kws...)
     @ Base.Sort sort.jl:1489

julia> sort(Vector{Union{}}())
Union{}[]

julia> 

@wsmoses wsmoses merged commit e1b8d3b into main May 16, 2025
52 of 56 checks passed
@wsmoses wsmoses deleted the sort branch May 16, 2025 17:04
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.

Piracy on sort TracedRArray type and sort with empty Tuple
2 participants