« first day (2860 days earlier)      last day (2093 days later) » 

2:41 AM
 
 
4 hours later…
6:42 AM
@JerryCoffin At least you are talking about MS DOS, an semi-ancient app that I have initially written 7 years ago still gets a few downloads a week.
I rely on Apple & Google on backward compatibility. They hate developers like us. But they still allow us to be mostly on their platform, even if we do naughty things occasionally.
 
 
4 hours later…
11:08 AM
@Mikhail because nobody sees the value in basic research anymore
 
 
1 hour later…
12:25 PM
Hey everyone
 
Hello. If you have a C++-related question, you may want to visit this room
 
 
2 hours later…
2:51 PM
I have a language lawyer type inquiry, I have I code of the form:
hash = some_hash(seed, &i1, sizeof(i1));
hash = some_hash(hash, &i2, sizeof(i2));
hash = some_hash(hash, &i3, sizeof(i3));
Where hash is a member variable. If I see repeated mov instructions to the address of hash, is it a failure of the optimizer or is the language twisting its arm somehow?
 
what's the type of i2 and hash?
 
Make sure all functions are inline and that optimizations are enabled.
 
The hashing function is inlined, optimizations are on
 
also weird
 
I can remove the extra mov instructions by putting a variable of the same type as hash on the stack and doing all the intermediate hashing steps on those and only storing it to the member on last assignment
buuuuuuuuuuuuuuut I was wondering if it was a failure of the optimizer or not
 
2:56 PM
sounds like a failure, it should be able to make sure hash doesn't overlap with i1, i2 and i3
 
I'm assuming it is because why would you write out to to memory if you know you're going to overwrite it right after
I've been arguing with this with my colleagues and my argument was "the compiler won't assume your code has data races so it should avoid the extra writes" but... I'm not 100% sure myself.
I'd search SO but honestly I'm not sure what I should search for.
 
@Borgleader That's what I would do.
@Borgleader Make it reproducible on compiler explorer.
That should be your first step.
 
 
1 hour later…
4:20 PM
 
4:37 PM
^ Shouldn't they have made the benches horizontal as well?
 
lol that bus stop design
 
nwp
4:55 PM
Is that from an anime? I can't tell.
 
It's from an anime called After the Rain.
 
nwp
The description doesn't sound way too normal for my taste. I'm more into fantasy.
 
Me too. But this was one that has been on my todo list for a long time.
So I finally got around to watching it. Mostly because I didn't have anything else to watch.
@nwp This season I'm also watching How Not to Summon a Demon Lord. You might like that if you're into comedy/fantasy.
 
nwp
5:12 PM
I can't bring myself to spend money on anime. And the stuff you get for free without putting much effort into is mostly not that great.
 
@StackedCrooked And fan service. :)
 
Yep :)
 
I like slice of life more and more
 
For example?
 
@StackedCrooked hostile design, they are probably intended to cause homeless people to slide off
 
5:20 PM
@Mgetz lol
 
you think I'm joking... that's a very real thing
 
@StackedCrooked I don't remember many names but ReLIFE and Yuru Yuri are examples
 
@Mgetz Actually, if you lie down on them with your head at the high side then it's a good position to avoid acid reflux.
@Mgetz Really?
@Morwenn I liked ReLIFE a lot.
 
bus stop benches are designed against homeless people more than not nowadays
I still have to finish reading ReLIFE though
 
5:24 PM
That's a bit cruel.
 
It is
 
@StackedCrooked welcome to america, where treating the symptoms is the problem
People don't want to hear "We should have public housing" they want to see less homeless people without paying more taxes
 
that's not just the US though
 
The new bus stops where I live have those kind of benches with an extra armrest in the middle, and are designed so that they seldom (or not at all) protect from wind and rain in a city where you've got wind most of the year and rain more often than in the rest of the country
The glasses don't touch: there are openings between glasses that are up to 10cm wide + 20cm openings between the glasses and the floor, and the same kind of opening between the glass and the roof
The roof itself is higher than it used to and the bus stops are not as deep as they used to
They're clearly design not to protect from the elements
 
@Morwenn "shelters"
lol
 
5:30 PM
@Mgetz So in Chicago, there's a lot of homeless in the streets. All over the place. They all disappear in the winter, but then they come back in the summer. Been wondering where they go.
 
They hibernate? (Ok, sorry. Bad joke.)
 
@Mysticial Greyhounds, long distance ones
They actually use them as long distance cheap shelters
 
@Mgetz interesting
There are some that'll have big coats for the start of the winter. But during like January and February where it stays below freezing for weeks at a time, nobody hangs around.
 
@Mysticial Greyhound to san Diego is cheapish and mostly warm
 
But why would they come back in the summer then?
Why not just stay in a warm place?
 
5:33 PM
@Mysticial family and COL
most warm places are extremely hostile to homeless folks
 
Chicago is not cheap.
 
Night buses saved my sister and I a few hotel nights when we went to Japan too
 
You went to Japan with your sister?
That's nice.
 
We slept three nights in such buses in three weeks, which additionally avoided to spend half of a day traveling
 
My sister been talking about Japan lately. But she probably intends to go with her boyfriend.
 
5:35 PM
Yeah, back in April ^^
 
@Morwenn Cool.
 
5:53 PM
@Mgetz California isn't. Have you been to SF?
 
@Mikhail Yes, SF is the exception and I wouldn't exactly call it welcoming either
 
Chciago has a bunch of homeless shelters and so does nyc. This is in contrast to the West coast. The differences in the homeless treatment between coasts is much debated in acamedic circles. See the Wikipedia article...
See the warehousing quote under the san fransico section
 
6:42 PM
Should I get Hellblade: Senua’s Sacrifice? Will I be too scared to play it?
 
7:19 PM
@Mysticial hey alex, do you have a minute? I have a quick question that I feel like you can answer in about a second
 
@OneRaynyDay what's up?
 
@StackedCrooked Nope--this way they have a built-in equivalent of a pillow.
 
@Mysticial I'm trying to use AVX2 simd instructions for taking the MSB of floating point numbers and saving them in a 8 bit primitive type
 
MSB = most significant byte?
 
there is the mm256_movemask* intrinsic that's exposed via GCC but it does every byte, meaning I get 3 bytes of garbage for fp32
yes
 
7:25 PM
or MSB = most significant bit?
 
so I either hardcode the hotpath for bitshifting down an uint32_t into a 8 bit primitive to remove the 3 bytes of garbage
oh - woops, bit
so if you had something like: {0, -0, 0, -0, ... }, then your result would be [01010101] in a byte
if that makes sense
 
_mm256_movemask_ps()?
 
however, with mm256_movemask you would get something like 0000100000001000....
What is ps in this case?
 
"packed single"
 
@OneRaynyDay single or double precision? Single would be _mm256_movemask_ps, double would be _mm256_movemask_pd.
 
7:28 PM
packed single = single precision?
 
yeah
 
and epi8 is 8 bit data, pd is double precision?
 
So take the top bit of every 32 bits and stuff it into an integer mask.
 
ah... I wish I had known that. Thanks so much
 
So 8 bits in the mask.
 
7:29 PM
yup - I'll just reinterpret cast into chars
 
you can normal cast it.
 
yup - gotcha
 
Interestingly, there's no integer variant of _mm256_movemask_ps() and _mm256_movemask_pd(). So you have to do a typecast on the register to use them.
 
Thanks :) I'm still pretty new to using simd intrinsics, not sure what these terms are. There's not a good reference on what they mean
 
7:33 PM
Oh, I meant the _epi8, _ps, _pd, etc, and _mm{AVX version}
and the mask_ vs maskz_ or whatever
 
There's not that many them.
 
yeah - I just ignored them until it came to bite me in the ass :) thanks so much though, I know this is probably a very dumb question from your point of view
 
_epi(8,16,32,64) - integer types
_si(128,256,512) - usually refers to the entire vector as an integer
_p(s,d) - packed, s = single precision, d = double precision
_s(s,d) - scalar, s = single precision, d = double precision
There's some weird-ass half-precision stuff in there which nobody cares about.
mask = blend masking
maskz = zero masking
Both are AVX512 only.
 
@JerryCoffin Why have I not seen that? lol
That shit's out of date.
lol
 
7:40 PM
@Mysticial Out of date (e.g., doesn't include AVX512 at all) but covers most of the basics he's asking about (data types, suffixes, etc.) well enough to make the naming patterns clear.
 
true
 
@Mysticial Seems like a mostly dead-end attempt at competing with GPUs.
 
They killed the good Xeon Phi line (Knights Landing) because it wasn't competing well with Skylake X/Server.
They specialized the other Xeon Phi (Knights Mill) for deep learning - which I believe is still getting crushed by GPUs.
Now they add AI instructions to the CPUs.
Admittedly, I don't know enough about the AI stuff to properly judge this whole AI push.
Most of the AI instructions seem pretty useless for anything else.
 
@Mysticial graphics people do for smaller workloads
 
And yet Intel seems to be going all in with it.
 
7:50 PM
@Mysticial There is a sweet spot for very small loads where the PCI-E bus latency is longer than it would just take to do it on the CPU
 
@Mysticial I'm not sure about "all in". I think for now they're kind of playing wait and see. If it keeps going well for nVidia, I wouldn't be terribly surprised to see them push a lot harder/farther in that direction--but for now, I wouldn't say they're doing a lot more than dipping a foot in the water.
 
@JerryCoffin the irony is that if they took the tech behind AVX512 and extended it to AVX 1024 with a very limited instruction set they'd have a graphics card
 
Intel first did away with double-precision to get everyone to use single-precision. Now they're doing away with single-precision to get everyone to use 16-bit integer -> 32-bit widening multiply.
@Mgetz There's neither bandwidth nor TDP for it.
And you can't run a graphics card at 4 GHz.
 
@Mysticial I didn't say do it in a CPU...
 
@Mgetz I don't see any real irony there. Most of the push toward wider vectors goes back to the Larrabee project, which built some graphics cards along the way toward the Xeon Phi stuff.
 
7:54 PM
OTOH. If Intel jumped from AVX512 -> AVX2048, then half-cycled the AVX2048 silicon. That might actually work from a power standpoint. Net result is 2x the performance (if utilized).
 
@Mysticial IIRC, you don't normally run AVX 512 at 4 GHz either. The obvious next step would be to let you run the AVX 512 at its speed without slowing down the rest of the CPU to match.
 
But I think we talked about this before. Changing frequency domains is one thing. But changing voltage domains is another.
 
@Mysticial why not just make their GPU double precision at that point?
they can easily beat the crap out of Nvidia from a latency standpoint
just add more execution units
 
@Mgetz That was Knights Landing. And it died.
 
Iris Pro is actually basically what I'm talking about technically
 
7:55 PM
Maybe if they made a Xeon Phi with AVX2048.
 
@Mysticial Keep going this way, and pretty soon you get back to the Cray 4. 64 double precision operands per cycle at 1 GHz (and decades ago at that).
 
@Mysticial the difference is I've abandoned the idea of x86
 
@Mgetz Fundamentally, this isn't specific to x86.
 
@Mysticial Quite true. But Intel's attempts with RISC + vector haven't gone all that well either.
 
@JerryCoffin Aha, I'm gonna be at HotChips this year.
 
8:03 PM
@Mysticial Cool. I'm sure your parents will appreciate the visit as well... :-)
 
Flying out Friday night. And staying for the entire week.
Even though HotChips only runs through Tuesday.
 
@Mysticial That was pretty much what I used to do--fly in Friday night, stay 'til Sunday afternoon (a week+ later). Plenty of time for Napa valley, family, redwoods, and whatever else...
 
ah
 
@Mysticial @JerryCoffin my bad, was pulled into lunch
I read both your responses during though. Thanks so much!
also, intel is focusing a large portion of their workforce into deep learning actually - check out Nervana
It's a deep learning library built on top of their specialized instructions
intel is trying to do the most money-making move - and that is to make deep learning architectures runnable on cpu
so they're doing a ton of neural network compression, quantization, power consumption decrease, etc to make the neural nets runnable with reasonable time and efficiency on cpu chips
currently gpus are dominating the DL market because of the sheer amount of float point computations and intel can't keep up
 
@OneRaynyDay I know all too much about Nervana--being based (partly) here in San Diego, there was quite a stir locally when Intel bought them. One of my former coworkers was pretty pissed when it happened--was convinced Nervana was a lot better at presentations than actual computing (and I've since heard bits from a couple Intel people more or less admitting the same).
 
8:18 PM
@JerryCoffin Ah, I didn't know Nervana is based in SD :) That is good to know. I was interested in perhaps interviewing there and seeing what kind of stuff they had
I'll keep a cautious eye
 
@OneRaynyDay They also have an office in the Bay Area (Palo Alto, perhaps?)
 
I see. I'm in SF currently and my family is in Santa Clara, so it's just in-between. I don't think Intel's the type of company to give a tour though
 
@OneRaynyDay Yeah--I don't think I know any of Nervana's people myself, but a number of my former coworkers know some of them personally. Almost everybody in high-tech in San Diego has worked for Qualcomm some time or other (or knows a lot of people who did) so almost everybody knows everybody else to at least some degree.
 
I'm actually curious about the DL workloads.
What is it about it that makes it use so much 16 x 16 -> 32-bit integer multiplies.
 
@Mysticial it uses BLAS for large matrix multiplications
and for many cases, including cuDNN, they have alternative implementations for things like convolutions
 
8:27 PM
@OneRaynyDay Probably not. But that does remind me: I got to go on a tour of Space-X Saturday. Was pretty awesome. Unfortunately, not allowed to take any pictures. In fact, had to sign a non-disclosure so comprehensive, I'm not sure I'm allowed to remember what I saw... :-)
 
@OneRaynyDay So integer BLAS with saturation.
 
where they decay the problem down from a convolution into a matrix multiplication problem that is 2 orders of magnitude bigger on gemm
 
And precision apparently doesn't matter because they've dropped the precision all the way down.
 
so yes, almost everything decays into a level 3 BLAS operation and BLAS loves floats
yes
@JerryCoffin are you allowed to disclose whether you liked the tour?
 
> Was pretty awesome.
 
8:29 PM
@Mysticial in nvidia, they have custom hardware support for fp16, called "tensor cores" which are essentially store 2 fp16 in a single 32 bit word and doing concurrent multiplication on them
so yes, companies are on the move to lower their precision
 
@OneRaynyDay And apparently integer with saturation is preferred floats possibly because it's easier for the hardware?
 
@Mysticial Mostly working with things they're lucky to measure to 1% precision, so if they have two or three digits left at the end, they're pretty happy...
 
@Mysticial actually it's mostly floats, no integers
The rationale is that sometimes your floats are too precise
 
@OneRaynyDay Half of the DL instructions that Intel is adding is specifically 16 x 16 -> 32-bit integer multiply-add with saturation.
 
and so the true "test accuracy" of your model actually sucks
 
8:30 PM
@OneRaynyDay I think so. I definitely enjoyed it a lot.
 
@Mysticial that's the move onto quantizing fp32/fp64 -> int16/int8s, which is also what amazon is trying to do
@JerryCoffin would you work there? Sounds like crazy work hours
But then again I also heard that from where @Mysticial works but it turned out to be okay ;)
you can approximate fp64 matrices by an int16 matrix multiply by some scalar
 
@OneRaynyDay Looks like they are dropping all the way down to 8 x 8 - > 16-bit integer multiply as well.
 
that's the int8, yup
 
They were getting ready for the astronaut interviews that happened Monday so there were cameras sitting around, sound and lighting getting set up, etc.
 
VPDPBUSD
@OneRaynyDay So how big are these matrices anyway. Since these are 8-bit integers, I figure it doesn't take much before they overflow/saturate.
 
8:33 PM
I think currently, intel and nvidia are pulling on the legs of these big DL frameworks like MXNet, tensorflow, pytorch, etc to make them use intel specific/cuda specific kernels
@Mysticial for perspective, there's a convolutional neural net called VGG19, where the weights themselves serialized to disk is about ~2GB's.
The intermediate representations of the input through the neural net is an order of magnitude larger
traditional OS X has to compress the pages in order to run a batch inference of 64 samples at a time through the neural net
 
I meant that if I was trying to say a matrix multiply with 16-bit accumulation precision with saturation, the matrix doesn't need to be very big for the majority of the elements to saturate at some point during the computation.
 
@Mysticial oh I thought those were float instructions... why would they do int?
I'm going to guess the answer is: Image processing
 
And once an integer saturates, it can go the other direction. At least with floats, you end up with infinity or NaNs to tell you that something overflowed.
 
@Mysticial The affine transformations through the neural net usually keeps the intermediate representation's expected value towards 0
and the magnitude is often regularized(kept small)
but yes, it does overflow, which is why they use higher precision accumulation
in nvidia's specific int8 quantization paper, they do some probability tricks with KL divergence to find the optimal int8 matrix and fp64 scaling factor. The intermediate values are very close to 0
 
@OneRaynyDay I thought about it.If I was still single, I probably would. I considered it enough to know that the schools in that part of LA are pretty poor though (e.g., Hawthorne High School is rated 3 out of 10), so there's no way my wife would consider it.
 
8:38 PM
@JerryCoffin woah - I didn't know you were that old jerry ;)
 
@OneRaynyDay I assume they normalize the matrices after each operation? Since these are all integers, the determinants is going to be bigger than 1. So after a few ops, things would get pretty big pretty quickly.
 
@OneRaynyDay If anything, the amazing thing is that I still have kids in school. Some of the people I went to grade school/high school with have grandchildren in school. But I was over 40 before I got married...
 
@Mysticial yeah - they normalize it, the magnitude gets absorbed into the fp16 scaling factor
 
ah
 
@JerryCoffin Oh, so your kids are going to highschool right now? Are they going to be mini-jerrys, or something different altogether?
 
8:46 PM
@OneRaynyDay My oldest is in high school, but my youngest is just starting first grade this coming year. My second oldest is probably the most like me so far. Oldest is definitely toward the jock end of the scale. The younger two are too young to really be sure yet. They mostly want to be like their big brothers right now.
Summary: A jock, a nerd, and two little boys.
 
That's pretty good diversity!
darn. only AVX512 has xnor.
 
9:37 PM
and darn. only AVX512 has popcnt
 
nwp
Hey, no profanities in the lounge.
Also avoiding the bad words filter is an instant ban. Bye!
 
> JESUS TITS DRUGS
has 8 stars on the sidebar
 
nwp
I guess you've been here too long to find that believable.
 
: /
By the way, is it necessary for one to perform _mm256_load_{}( ptr ); before performing any _mm256 operations, or can I just straight up use the pointers?
I would assume you need to load because the ptr's not in the XMM/YMM registers, but i just want to double check
 
@OneRaynyDay AVX512 only has XNOR between masks. But you can simulate any logic via Ternlog
Also POPCNT requires the AVX POPCNT extension, but you can simulate it using shuffles instead
@OneRaynyDay You can usually just dereference them, but be careful with alignment
 
9:50 PM
@Nyan how can I check whether AVX POPCNT is enabled on my machine?
 
AFAIK, unless you have Knight's Mill, you don't have AVX512 POPCNT
That's the only CPU which currently supports it. Icelake will support it though
 
actually, I was able to find _mm256_popcnt_epi64(...), is this a dummy op then?
I'm on AVX2
oh also, @Nyan then why does one need _mm256_load_si256 if you can just dereference things?
is it a very cheap op?
 
No, that's just AVX512VL + POPCNT
@OneRaynyDay The compiler will generate the load for you if necessary. Specifying the load makes it explicit, plus specifies alignment intention
 
I see. So no huge losses to making sure they're loaded. gotcha
 
It's generally better to explicitly do the load, in my opinion. The compiler can optimize it out if necessary
 
9:57 PM
gotcha. Thanks! And you're right:
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin17.7.0/8.2.0/include/avx512vpopcntdqvlintrin.h: In function 'void sum(int8_t*, int&)':
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/gcc/x86_64-apple-darwin17.7.0/8.2.0/include/avx512vpopcntdqvlintrin.h:117:1: error: inlining failed in call to always_inline '__m256i _mm256_popcnt_epi64(__m256i)': target specific option mismatch
 _mm256_popcnt_epi64 (__m256i __A)
 ^~~~~~~~~~~~~~~~~~~
I guess it doesn't exist, and this is its way of trying to tell me
 
For POPCNT, you can just split the vectors in half and use shuffles to count bits in the 4-bit halves, then sum them together. But since you're doing 64-bit width, it might be faster to pull out the values and use the scalar POPCNT instruction, than summing vectors many times.
 
@Nyan I see. Is that the _mm_popcnt_u64?
 
Yes.
 
I see. Gotcha. Also, what did you mean by the whole split vector in half thing? Is there a name for this algorithm?
It's a little hard to understand just by that tldr
 
Basically abuse the shuffle instruction for performing lookups. It's best if you only need relatively short widths, e.g. github.com/animetosho/ParPar/blob/…
 
10:38 PM
@Nyan I see.
Actually, I found a better one than that even - this one tries to emulate popcnt for avx2: github.com/WojciechMula/sse-popcount/blob/master/…
 
 
1 hour later…
11:58 PM
Its raining
 

« first day (2860 days earlier)      last day (2093 days later) »