-
Notifications
You must be signed in to change notification settings - Fork 18
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
Jaeyeon/newdispatch #362
Jaeyeon/newdispatch #362
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #362 +/- ##
==========================================
+ Coverage 76.04% 76.06% +0.02%
==========================================
Files 80 80
Lines 6830 6832 +2
==========================================
+ Hits 5194 5197 +3
+ Misses 1636 1635 -1 ☔ View full report in Codecov by Sentry. |
Something weird I have found:
Our problem is that |
@@ -232,8 +232,8 @@ virtual_intersect(ctx, a::Dimensionless, b::Dimensionless) = b | |||
|
|||
function virtual_intersect(ctx, a::Extent, b::Extent) | |||
Extent( | |||
start = @f(max($(getstart(a)), $(getstart(b)))), | |||
stop = @f(min($(getstop(a)), $(getstop(b)))) | |||
start = simplify(@f(max($(getstart(a)), $(getstart(b)))), ctx), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used to do it this way, but all the extra calls to simplify slowed the compiler down, so we avoid this now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI tests on the main branch used to fail because the result of simplify
was occasionally different on x64 Ubuntu Julia 1.6.7 when the Finch expression included a Limit.
Therefore, I attempted to explicitly launch the simplify
pass using this code snippet to verify if it works. In any case, it appears that your main branch now passes the continuous tests after your hash fix, so I assume the underlying issue was related to the static hash handling of the Limit type. Consequently, we can remove this change.
@@ -166,32 +166,30 @@ Base.:(+)(x::Limit)::Limit = x | |||
Base.:(-)(x::Limit)::Limit = limit(-x.val, -x.sign) | |||
|
|||
#Crazy julia multiple dispatch stuff don't worry about it | |||
limit_types = [Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, BigInt, Float32, Float64] | |||
for S in limit_types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This for loop avoids method ambiguities on types that define e.g. max(a::MyType, b::Real)
. If we define max(a::Real, b::Limit)
where Limit <: Real
, then we get an ambiguity error. If we want to take your approach, we need to make Limit
not be a subtype of Number
. I understand that this is suboptimal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see that currently Limit <: Number
, so Limit
is not currently subtyping Real
. I think this might work then. But should we have Limit <: Real
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was also a random attempt to address the CI issues in continuous testing. While it makes the code cleaner, it introduces ambiguity. Since the CI now passes, I believe we no longer need this pull request. Let's close it.
Hope this fixes the continuous tests on CI.