These are chat archives for halide/Halide

24th
Oct 2018
Andrew Adams
@abadams
Oct 24 2018 00:08
Hrm, I think it was mostly written that way to work with Halide::Buffer and Halide::Runtime::Buffer
Which is possibly no longer relevant
Steven Johnson
@steven-johnson
Oct 24 2018 00:09
yeah, seems unlikely
Andrew Adams
@abadams
Oct 24 2018 00:09
I guess originally I had some idea that it's a useful header for image io on any image-shaped class
Steven Johnson
@steven-johnson
Oct 24 2018 00:10
s/image-shaped/exactly-like-Buffer/
Andrew Adams
@abadams
Oct 24 2018 00:10
Originally it was written to only require width() height() channels() and data() methods
Oh, maybe stride too...
But yeah it's pointlessly general
Steven Johnson
@steven-johnson
Oct 24 2018 00:11
(there’s a minor glitch in that you can’t pass a Buffer<const void> to the save() methods, and fixing it is a rat’s nest, complicated by the extra templating
Andrew Adams
@abadams
Oct 24 2018 00:11
Actually it didn't need stride, it got it from &foo(0, 0, 1) - &foo(0, 0, 0)
Steven Johnson
@steven-johnson
Oct 24 2018 01:16
fun fact: correctness_image_io does in fact test Halide::Buffer and not H::R::B
Janboe Ye
@JanboeYe1_twitter
Oct 24 2018 06:28
hi, in LET IR, what's value and body? Thanks
Pranav Bhandarkar
@pranavb-ca
Oct 24 2018 13:16
'value' is the the value of the variable defined by the Let inside the 'body'
Janboe Ye
@JanboeYe1_twitter
Oct 24 2018 14:41
Sorry, I could not get what you said. @pranavb-ca. Could you give me an example?
Andrew Adams
@abadams
Oct 24 2018 15:42
let t = 37 in t * t
That's an expression with a value equal to 37*37
The "37" is the value of the let, and t*t is the body
Janboe Ye
@JanboeYe1_twitter
Oct 24 2018 15:43
Thanks a lot. @abadams
Shoaib Kamil
@shoaibkamil
Oct 24 2018 15:43
See the documentation in IR.h
Ah, Andrew beat me to it :)
Shoaib Kamil
@shoaibkamil
Oct 24 2018 16:42
@steven-johnson Is that buildbot a mac pro? I can't replicate on my laptop, but perhaps it's related to the actual HW
Zalman Stern
@zvookin
Oct 24 2018 16:46
Yeah, it is a Mac Pro from a while back.
On the flipside, our HelloiOS project causes Apple's clang to seg fault compiling run-of-the-mill Objective-C++, so I'm not really going to give Apple the pass on it being old hardware. (I did file a bug.) We should probably try to figure out what is seg faulting and maybe file a bug.
Shoaib Kamil
@shoaibkamil
Oct 24 2018 16:54
Agreed. I'm going to continue digging into this
Steven Johnson
@steven-johnson
Oct 24 2018 17:41
Do you need to login to the actual buildbot to debug?
Shoaib Kamil
@shoaibkamil
Oct 24 2018 18:06
Nope, looks like I can replicate. It happens about 2-3% of the time. Thanks though
Steven Johnson
@steven-johnson
Oct 24 2018 21:51
@abadams comments on pseudostack posted. Looks like allocation size can go negative (!), but the real issue smells like some unhandled race conditions; there are lots of weird flaky issues but TSAN seems to be pointing at use-after-free issues.
Andrew Adams
@abadams
Oct 24 2018 21:56
I think I see the issue with negative allocations
Maybe a negative allocation can cause threading issues somehow? I don't see what else might cause tsan to complain.
Certainly the negative allocations would result in use-after-free
Steven Johnson
@steven-johnson
Oct 24 2018 21:57
maybe. will try that fix
Andrew Adams
@abadams
Oct 24 2018 21:57
which can do anything
About to push a fix.
Pushed
find_constant_bound already constant-folds, so the simplification was totally pointless
and casting to an int32 was just wrong
Steven Johnson
@steven-johnson
Oct 24 2018 22:00
probably also work adding a compile-time assertfail if we try emit a negative alloc :-)
Andrew Adams
@abadams
Oct 24 2018 22:01
Yeah, I added that size >= 0 to the user assert :)
Steven Johnson
@steven-johnson
Oct 24 2018 22:07
ok, the first two failures pass now. gonna do another retest
Pranav Bhandarkar
@pranavb-ca
Oct 24 2018 22:43
our internal buildbots are seeing failures in test_correctness. Using halide from github and LLVM upstream
correctness_argmax
Arg max of h is 68518000, but should have been 2500
make: *** [correctness_argmax] Error 255
bash: line 1: 31105 Segmentation fault      /local/mnt/workspace/bots/hexbotmaster-aus-perses-10-1/halide-tip/src/halide/bin/correctness_boundary_conditions
make: *** [correctness_boundary_conditions] Error 139
Steven Johnson
@steven-johnson
Oct 24 2018 23:33
I’m not seeing that locally, but I’m not at most recent llvm trunk