« first day (2504 days earlier)      last day (2449 days later) » 
02:00 - 23:0023:00 - 00:00

user784668
11:04 PM
Done, updated.
 
user784668
@Mysticial Try to use MinGW if at all possible, because MSVC is MSVC and you'd probably have to add __forceinline to all functions, otherwise the generated code will be MSVC-quality, to put it mildly.
 
@Fanael I'm gonna use ICC. Since MSVC doesn't have AVX512.
Well, the latest one does, but I don't have it installed.
 
user784668
@Mysticial ICC butchers scalar rotations, though, and uses sh[lr]d instead of ro[lr].
 
Just use the intrinsic for it.
I'm not gonna have MinGW installed on that box.
Did they ever fix the AVX stack alignment problem on MinGW?
 
user784668
11:20 PM
 
user784668
@Mysticial What AVX stack alignment problem?
 
Assignee: Not yet assigned to anyone
Sounds like a pretty "show stopping bug"
It's the only thing keeping me from building all of the Folding@home software for Windows under Linux. We need AVX for our protein folding simulations.
 
user784668
@Mikhail lol, Microsoft is totally retarded if SEH unwinding info can't express stack realignment
 
makes for better security
 
Security Through Unusability
 
user784668
11:23 PM
@Mysticial So intrinsics don't help.
 
Security Through Framework Unusability (STFU)
4
we can do better
 
@Fanael That's retarded.
 
user784668
@Mysticial Then remember to pass -xCORE-AVX512, so it generates rorx instead of shld.
 
@Fanael Looks like ro[lr] is slower than sh[lr]d on Haswell.
 
user784668
@Mysticial It's not.
 
11:31 PM
Why am I seeing all these 6-cycle instructions on Agner's tables?
 
user784668
@Mysticial That's rc[lr].
 
oh... ahaha. I'm dumb.
 
user784668
ro[lr] are 0.5 cycle throughput, 1 cycle latency; sh[lr]d are 1 cycle throughput, 3 cycle latency.
 
user784668
Also ro[lr] go to barrel shifters on ports 0 and 6 while sh[lr]d goes to the "slow integer" (think bit scans, CRC32 and so on) unit on port 1.
 
user784668
@Mysticial Then again you already need -xCORE-AVX512 to get AVX512 anyway.
 
11:37 PM
Looks like -march=core-avx2 is enough.
 
user784668
@Mysticial Yeah, because that's core-avx2 is Haswell.
 
@Fanael I'll need to check, but it wouldn't be above ICC to convert your shift + OR intrinsics into rotates if I compile for AVX512.
 
user784668
And BMI2, which is where rorx is from, was introduced in Haswell.
 
I've also noticed that compiling for AVX512 forces the code generate AVX even when the code is not vectorizable which causes the AVX clockdowns.
So I'll need to pay attention the clock speeds.
 
Thats weird, what signals clockdowns?
 
11:40 PM
Since my box currently runs:
- Scalar/SSE @ 4.5 GHz
- AVX @ 4.0 GHz
- AVX512 @ 3.8 GHz
 
user784668
@Mysticial Just checked and ICC 17 doesn't.
 
user784668
Also, WTF.
 
user784668
@Mysticial -march=core-avx512 uses shld, -xCORE-AVX512 uses rorx
 
@Mikhail The processor is aware of what instructions its executing. And it will clock down when running said instructions to avoid burning up the processor.
 
In your case they aren't executed, though (I believe that is what you wrote)
 
11:42 PM
@Mikhail I have a feeling something as simple as a vzeroupper will cause the clock down.
But I haven't specifically tested it yet.
 
Okay, so actually they are executed
 
yes, it won't clock down unless it gets into the pipeline.
I don't know if bad speculation into an AVX(512) instruction is enough to cause a clockdown.
 
^ this was my question :-)
 
user784668
@Mysticial There's no such thing as "speculation", so probably it is enough.
 
FYI, had to assert that several std::vectors<T>.size() matched in size. Was too hard to figure out how to loop over them because T is different and I don't know C++. Used a reinterpret case to one of the types and it worked. One week till I deploy :-)
 
11:47 PM
@Fanael It may take more than one AVX(512) instruction to actually cause the clock down. So if a branch mispredict causes it to execute an AVX instruction once, but not again later, it may not clock down at all.
Though it won't be able to run the lone AVX(512) at full speed since the resources are power-gated and the processor may not be stable running AVX(512) at that higher frequency.
So it can't run AVX(512) at full speed until it clocks down and powers up the resources for them.
 
user784668
@Mysticial Sure, I'm just against the whole notion of "speculative execution", because it's the only possible state in any CPU implementing a variant of the Tomasulo algorithm, because it's a direct consequence of how said algorithm works.
 
user784668
And because of that, it's vacuously true and thus rather unhelpful.
 
user784668
@Mysticial You can always download it, it's what, 70 MB?
 
user784668
@Mikhail what
 
Best way to check that 9 vectors that hold different objects have the same number of elements...
 
user784668
11:53 PM
@Mikhail assert(v1.size() == v2.size()); assert(v1.size() == v3.size()); and so on?
 
too hard, I got 9 of them, instead I reinterpret casted them to form a solid array
 
user784668
@Mikhail That's just 8 comparisons though.
 
Its a code complexity issue, aka how can I save lines, typing
 
@Fanael "...because it's the only possible state..." because what is the only possible state?
 
user784668
@Mikhail You're now in the undefined behavior land.
 
11:55 PM
Yes, but I'm also gangsta
Also its completely defined, just might fuck up if the underlying representation of the vector changes
 
@Mysticial I can almost see where it would make sense for the CPU to play games like the HotSpot JIT does, and keep track of whether a particular sequence executes enough AVX 512 instructions to justify using the "real" AVX 512 unit.
 
user784668
@Mikhail [basic.lval]/8 disagress with "it's completely defined".
 
02:00 - 23:0023:00 - 00:00

« first day (2504 days earlier)      last day (2449 days later) »