Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

the talent deficit posted:

one of my okrs was making sure our api was 100% documented with swagger autogenerated from the code so i spent like 75% of the quarter adding annotations to data classes in kotlin. was a great use of my time

omg okrs aren't a brain virus unique to Apple?

Adbot
ADBOT LOVES YOU

luchadornado
Oct 7, 2004

A boombox is not a toy!

jit bull transpile posted:

omg okrs aren't a brain virus unique to Apple?

any place large enough to have product owners has to have some sort of way to keep them accountable - be it okr/kpi/whatever

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
They are a brain disease created at intel, reinforced at the goog

leftist heap
Feb 28, 2013

Fun Shoe

jit bull transpile posted:

omg okrs aren't a brain virus unique to Apple?

not by a long shot

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Plank Walker posted:

speaking of swagger, can anyone recommend some sort of formatter for making swagger documentation actually readable? product i'm working on consumes a horrible mess of deeply nested data structures and the default swagger view is horrible, but i can't for the life of me find anything that would consume the swagger api json and turn it into something nicer like msdn pages

if you don't need the swagger visualization to also work as an API client, ReDocs looks really good.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

bob dobbs is dead posted:

They are a brain disease created at intel, reinforced at the goog

only kpi i'm interested in is number of heads in gullotines

JawnV6
Jul 4, 2004

So hot ...

bob dobbs is dead posted:

They are a brain disease created at intel, reinforced at the goog
they'd metastasized into IMBO's during my time there, intel management by objective, but even that sorta faded away by the end

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

JawnV6 posted:

they'd metastasized into IMBO's during my time there, intel management by objective, but even that sorta faded away by the end

LIMBO

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
intel management butt odor

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

ColTim posted:

Does anyone have any links to intrinsics code like the stuff here? (ideally not using wrapper libraries that abstract them out)

I was trying to find a bunch of code I wrote in school that was heavy on the intrinsics for ya, but it seems to be lost to time. :( Here's some conciliatory info. I've done some SIMD stuff otherwise, I'd be happy to write an example if you want to see something specific - I've got some time on my hands before I start a new job.

Intel Intrinsics Guide, intel's intrinsics reference. Not always the most descriptive ... but it's there.

UTF-8 processing using SIMD

XML Parsing Accelerator with SSE4

Most of what I've done outside of school was related to parsing, so I happened to have these bookmarked. I admit that I just skimmed over that paper, but that's a hella comprehensive reference to add to the pile.

:rip: knights hill

ColTim
Oct 29, 2011
I'm really just trying to track down more "real world" examples of their use, so your links are very helpful. I'm not focused on any specific problem domain, just feels like the only way to pick this stuff up is by reading other people's code.

I've done a little intrinsics stuff, just toy kernels though. Probably half of it is just frankensteined snippets from the sse/avx/avx2/avx512 tags on stackoverflow. Whole thing feels like Shenzhen I/O, lots of fun little puzzles to solve.

And yeh, then there's the dozens of AVX512 flavors, and only two or three chips that support it. Gives me time to learn more about it though =P

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)
Yeah I really like doing it because you have to get creative about how you combine masks with the available instructions, like with the offsets in that utf8 link.

Intel provides SDE, which can emulate all intel instructions on any processor, if you weren't already aware of it.

TheFluff
Dec 13, 2006

FRIENDS, LISTEN TO ME
I AM A SEAGULL
OF WEALTH AND TASTE

ColTim posted:

I'm really just trying to track down more "real world" examples of their use, so your links are very helpful. I'm not focused on any specific problem domain, just feels like the only way to pick this stuff up is by reading other people's code.

I've done a little intrinsics stuff, just toy kernels though. Probably half of it is just frankensteined snippets from the sse/avx/avx2/avx512 tags on stackoverflow. Whole thing feels like Shenzhen I/O, lots of fun little puzzles to solve.

And yeh, then there's the dozens of AVX512 flavors, and only two or three chips that support it. Gives me time to learn more about it though =P

zimg has the most extensive use of intrinsics I've ever seen. check src/zimg/**/x86 for the stuff. you'll get the same functions implemented for a whole bunch of different CPU's and usually the functions are also generic in some way using c++ templates. there's usually no documentation of the assembler implementations but there should be a matching c++ implementation of each function one level up in the directory tree.

Bloody
Mar 3, 2013

dumb question how does that work in practice? like you just ship a binary with avx and not-avx code paths and something flags it at run time and the compiler or linker helps you get it right at build time or what

I have no actual understanding of how static compilation produces binaries that run on effectively many subtly different processor architectures

do the jvm and clr have magic to jit out the best opcodes for the platform they're running on?

pseudorandom name
May 6, 2007

you write different versions of the same function and call through function pointers or branch based on a flags variable or something

if you’re feeling clever, on Linux you use IFUNC resolvers to do the magic for you, either by writing the resolver yourself or I think sufficiently recent gcc’s have function attributes that will do it for you

and, yes, JITs are like any other compiler, they optimize for the target processor

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Bloody posted:

dumb question how does that work in practice? like you just ship a binary with avx and not-avx code paths and something flags it at run time and the compiler or linker helps you get it right at build time or what

I have no actual understanding of how static compilation produces binaries that run on effectively many subtly different processor architectures

in most code they just generate the best instructions that’ll work on the minimum cpu target. this can lead to hilarious things like 32-bit x86 code generated ityool 2019 that can’t assume that sse exists because technically you could be planning to run that code on some ancient pentium

in very specific code some compilers will generate code that checks instruction availability, but most compilers don’t do this but it’s expensive and hard to do well enough that it’s actually profitable. icc is very good at this. otoh icc also got in trouble for this because they made some of their vector checks way more specific than they really needed to be and so amd processors were falling back on like completely unvectorized code. checking for a specific processor is less ridiculous than you might think — when you’re scheduling code there are a lot of decisions that depend on microarchitectural details, and making the wrong decision can be killer for performance — but still

Bloody posted:

do the jvm and clr have magic to jit out the best opcodes for the platform they're running on?

yes, and even assume that in the calling convention if they want

TheFluff
Dec 13, 2006

FRIENDS, LISTEN TO ME
I AM A SEAGULL
OF WEALTH AND TASTE
you want to do the dispatching yourself tho, because usually if you're handwriting simd code it's because you're compiler is a pos and you need the performance. the fact that a cpu has an instruction doesn't mean it's actually faster (zimg in particular ignores certain avx instructions on zen and piledriver).

zimg will also do things like examine the cpu cache hierarchy at runtime in order to slice images into suitably sized chunks that lets it avoid costly cache evictions. it's actually bound by memory bandwidth in some relatively common scenarios, not by the cpu itself.

people think that surely compilers are p deece at autovectorization now, but nope, they're not. most commonly used image dsp and compression/decompression stuff has significant bits of handwritten simd assembly still, if it hasn't moved to the GPU or to fixed function hardware.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
yeah autovec is basically useless garbage if you let it loose on general code, and even with strong hinting it’s surprisingly bad

Soricidus
Oct 21, 2010
freedom-hating statist shill

rjmccall posted:

yeah autovec is basically useless garbage if you let it loose on general code, and even with strong hinting it’s surprisingly bad

so it’s already equivalent to a 10x developer

pseudorandom name
May 6, 2007

didn't icc get in trouble for generating the worst possible code for AMD processors?

i.e. it wasn't just naive or generic or whatever, Intel developed an instruction scheduling model that maximally pessimized execution on AMD CPUs

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull

pseudorandom name posted:

didn't icc get in trouble for generating the worst possible code for AMD processors?

i.e. it wasn't just naive or generic or whatever, Intel developed an instruction scheduling model that maximally pessimized execution on AMD CPUs

no, as rjmccall said they got in trouble for generating detection code which failed to select the vectorized codepath on amd cpus which could have supported it

there were loony amd fan web forums which probably believed intel was maximally pessimizing or w/e though, maybe you caught some of that noise?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
my favorite story behind this is that i was gearing up to write some simd code so i got all my data structures in a row and then when i went to compile the autovectorizer automatically went "i got this" and tried to autovectorize my code. unfortunately it then hit one of those "clang deoptimization" bugs so the program size exploded and it got slower.

that was a fun bug to track down

Notorious b.s.d.
Jan 25, 2003

by Reene

Bloody posted:

I have no actual understanding of how static compilation produces binaries that run on effectively many subtly different processor architectures

they don't.

if microarchitectural issues matter to you, you, the programmer, have to plan for that

Bloody posted:

do the jvm and clr have magic to jit out the best opcodes for the platform they're running on?

yes, but they're not particularly good at it

JawnV6
Jul 4, 2004

So hot ...

Notorious b.s.d. posted:

they don't.

if microarchitectural issues matter to you, you, the programmer, have to plan for that
??

the case we're ostensibly talking about was happy to stuff 18 implementations in and do a runtime dispatch based on what CPUID said was around

if("GenuineIntel") good_code();
else amd_code();

Notorious b.s.d.
Jan 25, 2003

by Reene

JawnV6 posted:

??

the case we're ostensibly talking about was happy to stuff 18 implementations in and do a runtime dispatch based on what CPUID said was around

if("GenuineIntel") good_code();
else amd_code();

yep.

i worked with one horrible library not to be named that had like 40 runtime versions, and would dlopen() the correct one at runtime

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
here's one of my favorite clang explosions (was eventually fixed in later versions)

try to guess what the difference is between the functions

https://godbolt.org/z/q_DnC2

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

JawnV6 posted:

??

the case we're ostensibly talking about was happy to stuff 18 implementations in and do a runtime dispatch based on what CPUID said was around

if("GenuineIntel") good_code();
else amd_code();

and while we were busy with 18 implementations of code the Russians just used java

dougdrums
Feb 25, 2005
CLIENT REQUESTED ELECTRONIC FUNDING RECEIPT (FUNDS NOW)

Suspicious Dish posted:

here's one of my favorite clang explosions (was eventually fixed in later versions)

try to guess what the difference is between the functions

https://godbolt.org/z/q_DnC2

Clang was thinking it could take advantage of the two integer EUs over a load and the mul? Poor fella just paralleled too hard :(

ColTim
Oct 29, 2011
I guess it's exacerbated by how the `set` intrinsics don't correspond to single assembly instructions so there's more wiggle room for compilers to be smart (or dumb)...

Also thanks for the zimg link! It's always great to come across established libraries that solve problems you don't even know exist... now I just have to figure out how xbyak works. Or rather, what it does exactly. =|

animist
Aug 28, 2018

ColTim posted:

I guess it's exacerbated by how the `set` intrinsics don't correspond to single assembly instructions so there's more wiggle room for compilers to be smart (or dumb)...

Also thanks for the zimg link! It's always great to come across established libraries that solve problems you don't even know exist... now I just have to figure out how xbyak works. Or rather, what it does exactly. =|

it turns a bunch of code like "mov(eax, 3); ret()" into a buffer full of equivalent machine code at runtime. looks like dynasm but maybe with more features

jony neuemonic
Nov 13, 2009

jit bull transpile posted:

omg okrs aren't a brain virus unique to Apple?

i’ve seen them at more than one startup. if a big company does something there’s a thousand startups cargo culting it.

akadajet
Sep 14, 2003

my company says they do em but they really don't

cinci zoo sniper
Mar 15, 2013




our new chief scrum wizard officer type proposed okrs that would not count towards bonus (unlike kpis that are separate from new okrs and not going anywhere), got flustered by an audience question "excuse me, why should i care about them then" and idk where he is now

prisoner of waffles
May 8, 2007

Ah! well a-day! what evil looks
Had I from old and young!
Instead of the cross, the fishmech
About my neck was hung.

cinci zoo sniper posted:

our new chief scrum wizard officer type proposed okrs that would not count towards bonus (unlike kpis that are separate from new okrs and not going anywhere), got flustered by an audience question "excuse me, why should i care about them then" and idk where he is now

call the missing scrum wizard hotline

Agile Vector
May 21, 2007

scrum bored



akadajet posted:

my company says they do em but they really don't

oh like my company and agile

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

cinci zoo sniper posted:

our new chief scrum wizard officer type proposed okrs that would not count towards bonus (unlike kpis that are separate from new okrs and not going anywhere), got flustered by an audience question "excuse me, why should i care about them then" and idk where he is now

i dont think you can say "chief wizard" on public television

spiritual bypass
Feb 19, 2008

Grimey Drawer
whats an okr

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



rt4 posted:

whats an okr

o know right

leftist heap
Feb 28, 2013

Fun Shoe

rt4 posted:

whats an okr

nobody knows, but you gotta update em every quarter

Adbot
ADBOT LOVES YOU

raminasi
Jan 25, 2005

a last drink with no ice

rt4 posted:

whats an okr

objectives and key results

“what am i trying to do and how will i define having done it”

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply