-
Notifications
You must be signed in to change notification settings - Fork 1
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
github actions failing under PDL-2.096 #18
Comments
... might have to do with the CCS functions' [map {$_->ppsym} grep {$_->integer} PDL::Types::types()] ... have there been (non-deterministic) changes to this order? Or to the way |
can reproduce. found workaround (-> 07bb416). still think there's something weird going on. |
Without having checked yet, One thing that's changed in PDL 2.096 is that where it's an available type, the output Par(s) dictate the GenericType of the xform. Considerable efforts have been made to make that not cause problems and be backward-compatible, but it's conceivable I've missed something. I'll have a look at what's happening with the CCS commits you mention above and see if there's something you can do in CCS to not be broken by this, or if it's something in PDL that needs fixing. |
To add to the above: The problem will be some combination of these factors, and I'd imagine that being more finicky about passed-in types will lead to success. That "use the last-given type" thing is one reason why complex types are opt-in; they are numbered higher than all real types, so if they got selected as the GenType of e.g. a newly-complex-capable |
Thanks for the clarification! The
... and if I'm reading it right, then |
Can you say what if any PDL xforms you're using, the whole signature of your op, and the types of all the inputs you're giving it? |
signature (ccs_accum_bor)
minimum broken example
xformsno explicit ones, but I am passing in perl scalars for As it turns out, if I pass in ... that suggests a more robust CCS-internal workaround (--> always pass in a |
@mohawk2 I'm closing this as resolved by the CCS-internal workaround, but I still believe that the behavior indicates a bug in PDL core's choice of output type. Feel free to investigate ... or not. |
@moocow-the-bovine I'm glad you've got a situation that works with both old and new. However, your feeling of surprise at the situation is an important signal, so I'd like to just examine that a bit more, and especially get your input. I'm going to "comment" this now, in case that happens to catch your attention, but I'll carry on adding to it to complete the thoughts. First, what happened isn't precisely a choice of output type, but of the xform's "generic type" (the value of Secondly, the influence on that of a provided Perl scalar is as follows: those get turned into the smallest-numbered datatype for that class of data: Perl IVs, UVs, NVs, and Math::Complex objects each become one of the relevant PDL datatypes (Math::Complex only becomes Up till 2.096, if any parameter (input or output) was of a non-allowed type, that forced the xform datatype to instead be the last-given type, as discussed above. As of 2.097, as you have found, it only now does that if no allowed type was given; if one was, it will go with that. I'm inclining as a result of your surprise towards switching that logic back so any non-allowed input again does the forcing, and using the test you've given above (I can find a core equivalent) to make that the permanent behaviour. What do you think? |
@mohawk2
💡 ... so scalar
(symptomatically) confirmed; if I pass in
It's complicated; it's pretty clear to me that:
... so I think that:
All of that is very CCS-centric ... regarding switching that logic back in PDL core, I don't have a strong feeling one way or the other. Some thoughts:
Going a bit more abstract (and harking back to our earlier discussion of "type variables"), I want to conceptualize the "native type of an operation" in terms of a unification operation (== least-upper-bound over a set of (given) types with respect to a bounded complete partial order). That BCPO can be just a chain (e.g. the sort-order |
These matters are all discussed somewhat on PDLPorters/pdl#511, I'd encourage you to take a look there too. That includes points about how to deal with Perl scalars, noted in your second and fourth bullet-points. Your term "native" type of the specific instance of the operation seems to mean the same things as my "generic type" or "datatype". I'd encourage "datatype", but it's up to you. I think you're likely to be right that it's only CCS that gets affected by the change of behaviour, but since it is a real change of behaviour, that's not notably beneficial, I'm going to change it back. Thank you for your careful (including some bonus highly-abstract!) thoughts. Regarding your last point, my aim is to just let actual ndarrays passed in determine the type (including "didn't match any, go to last-given"). Then the Perl scalars would get converted appropriately. I could imagine allowing overrides of type-selection for a given xform (maybe with a |
Interestingly, a naive implementation of restoring that pre-2.096 behaviour (if given any non-available) broke some tests because of the Perl scalar issue: |
that makes sense to me in terms of a "least upper bound" datatype for the operation. |
github actions are failing for PDL-CCS commit a9a4882 under PDL-2.096 only
I could not reproduce this locally using the PDL git2.096
tag PDLPorters/pdl@87bed59.Problem seems to be changes to the output type & BAD-handling of
PDL core'sCCS'sbandover
andborover
with respect to PDL core. I think the CCS BAD-handling is right, but output type is defaulting tosbyte
rather thanlonglong
.@mohawk2 any ideas?
for the record, failing tests look like:
The text was updated successfully, but these errors were encountered: