-
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
Tweaks #5
Tweaks #5
Conversation
Pull Request Test Coverage Report for Build 2146365966
💛 - Coveralls |
Thanks for PR -- especially the extensive test cleanup! Merged to master & uploaded to CPAN as v1.23.19 |
Very welcome! As mentioned above, I was investigating a segfault caused by a PDL change, and I'd be interested in your thoughts, since it's triggered (as a segfault at least) only by this module. The issue there is triggered by very specific circumstances: the output ndarrays' badflag getting set, when the output ndarray was a converted one (using PDL, when destroying a transform, currently destroys all associated ndarrays that don't have parents or children or, crucially, a true The aim of the PDL change, pursuing the aim in PDLPorters/pdl#358 (specifically point 5), is to stop using
The inputs passed in to the PP transform:
Annotated excerpt from the output of
The problem here arises because ndarray 5 ( Options within PDL:
Probably desirable actions for PDL::CCS, but only to be done after the PDL issues are fixed (which I don't want to mask by fixing the symptom here first):
|
Whoof. Looks like you had some detective work tracking that down -- sorry if PDL::CCS if causing undue trouble. Without fully understanding all of what's going on, I'm not sure how meaningful my input will be. One thing in particular jumps out at me immediately though:
This is probably wrong (bad test design, my fault): pdl 2 (a.k.a.
While I can imagine cases where
I think the coercions from
Lacking that kind of functionality (and I do realize that it's a tall order which is probably overkill for 99% of PDL applications: I certainly wouldn't want to write it), I settled for nailing down
... so I see 2 concrete things going wrong already in PDL::CCS here:
I'm not sure to what extent (if any) fixing these would help to avoid the segfault behavior you're seeing, but I'm certainly willing to fix them.
I suspect my vision of "type variables" would lead to a similarly ridiculous explosion of code, and should probably be avoided for that reason.
I'm still struggling to get my head around these, and don't have any immediate intuitions. I do agree that it's preferable to avoid ABI changes if possible.
Understood. Please let me know when it's OK for me to fix the type-mismatch in
Probably a good thing, but I'm hesitant. I'm certain™ that I originally introduced the
It needs it here for
For the high-level Thanks again for the detective work! |
Created #6 so that the CCS-specific bugs don't get buried here. |
As noted on the relevant PDL commit (PDLPorters/pdl@bcd4ea3), reproduced here:
Spelling the point out again (because there are many points under discussion here!): PDL::CCS was doing something a bit funky, but exposed a genuine problem with propagation of badflags, and also revealed the very clever (but tricky) feature of PDL that you can pass in a differently-typed ndarray to an operation, and get the results back, correctly converted (including bad values). If I'd thought it was only a problem in CCS (and there are a couple of improvable things), I would just have fixed them in this PR :-) The motivation behind all of this, as touched on above, is to smooth out all the quirks and wrinkles in the current PDL implementation, to allow loop-fusion (PDLPorters/pdl#349), which I think will actually be possible fairly soon. This will still need eliminating more of those quirks, but without breaking downstream modules more than the absolute minimum (and hopefully only where they had genuine mistakes). |
Very tricky, and with the single-parent model we have, might be impossible.
This would break my $pa = pdl 2,3,4;
$pa->doflow;
my $pb = $pa + $pa;
$pa->set(0,50); This operates correctly and changes
This was implemented the linked commit above, and together with making Luckily, there is an easy solution to this:
With that, when-not-if I delete the
Deferred for now.
Done - no ABI update required! But see notes to point 3 (which are largely needed anyway due to the |
After some time... The |
While pursuing a segfault caused by latest PDL, I've discovered a couple of possible improvements. The second commit switches to initialise
missingVal
before it gets used.