HNHacker News
TopNewBestAskShowJobs

abainbridge

1,994 karma · joined October 5, 2012

submissionscomments
abainbridge··on Undefined behavior is often a thing for C programmers (2011)
Compilers started to generate surprising code more regularly. Here's an example of a function taking void* parameters, that are cast to uint64_t* and then used. Upto gcc 6.3, you get a "sensible" result. After gcc 7, with -O2, you get a surprising result. https://godbolt.org/z/ugSDmr

If you get Godbolt to run the program and show the output, you'll see it change with GCC version.

Obviously what is "sensible" and what is "surprising" is subjective.

abainbridge··on Surprising new feature in AMD Ryzen 3000
Trying to understand this.

Using latencies from Zen 1 instruction table (see https://www.agner.org/optimize/instruction_tables.pdf):

    mov dword [rsi], eax ; MOV m,r latency is 4
    add dword [rsi], 5 ; ADD m,i latency is 6
    mov ebx, dword [rsi] ; MOV r,m latency is 4
Total = 14

Each instruction depends on the result of the previous, so we need to sum all the latency figures to get the total cycle count. Is this right? How does Agner make it add up to 15?

Then for Zen 2:

    mov dword [rsi], eax ; MOV m,r latency is 0 (rather than 4,
                         ; because it is mirrored)
    add dword [rsi], 5 ; ADD m,i cannot find an entry for this.
                       ; Looks like there's a typo in the doc.
                       ; I guess the latency is 1.
    mov ebx, dword [rsi] ; MOV r,m latency is 0
Total = 1

Again, how does Agner make it add up to 2?

And for Intel Skylake:

    mov dword [rsi], eax ; MOV m,r latency is 2
    add dword [rsi], 5 ; ADD m,i - latency is 5
    mov ebx, dword [rsi] ; MOV r,m latency is 2
Total = 9
abainbridge··on Direct evidence for T-cell immunity as a factor behind Covid-19 heterogeneity
Is there evidence that more than one person caught it from an animal? I haven't heard of any. I expect that is the kind of thing one can learn from genetic sequencing of the virus - ie when a new strain is seen that has multiple genetic differences from any previous sample from humans, that would be evidence for re-infection from an animal species were the virus had been circulating for a while.
abainbridge··on Nvidia will build 700-petaflop supercomputer for University of Florida
You're right. The article is wrong. It said:

> A single A100 GPU’s 54 billion transistors can execute 5 petaflops of performance, according to Nvidia.

It is a single system of 8 GPUs that can do 5 petaflops.

I can't edit my post anymore. Multiply my numbers by 8, or a bit more if you want to take into account higher utilization and the other overheads you mention. So ~500 cars. This is my final offer.

abainbridge··on Nvidia will build 700-petaflop supercomputer for University of Florida
Damn. I was confused by the fuel consumption being in per 100 km units. I've edited my post. Thanks.
abainbridge··on Nvidia will build 700-petaflop supercomputer for University of Florida
Seems like it has about 700/5 = 140 GPUs. And they are about 0.4kW each. Let's say it is 50% utilized for a year. That is 140 * 0.4 * 0.5 * 365 * 24 = 245280 kWh.

Let's say electricity generation creates 0.5 kg CO2e per kWh. So 122640 kg CO2e per year.

For comparison, driving a cars creates about 0.2kg CO2 per km. Or 0.32 kg per mile. So about the same as driving 122640 / 0.32 = 383250 miles per year. Call it 38 cars.

Edit: Corrected the above CO2 per km figure to fix a factor of 100 error.

Obviously there are a million things wrong with this analysis. For example, we don't know if they're going to use the machine to do climate modelling that will lead to a headline in the media that causes the green party to be elected ;-)

abainbridge··on Nvidia will build 700-petaflop supercomputer for University of Florida
Graphcore claims they do. I don't know true that is though.
abainbridge··on Nvidia will build 700-petaflop supercomputer for University of Florida
Does anyone know why everyone is still buying Nvidia instead of custom AI accelerators from other vendors? For example, on paper the new Graphcore machines look like an easy win, or at least a risk worth taking. (I see this particular supercomputer was funded by Nvidia but my question is about the general trend).
abainbridge··on Almost one-third of Florida children tested are positive for the coronavirus
Is there any evidence you can re-contract Covid-19? If not, I'd fall back to the following argument: Some health care workers have been exposed regularly for six months by now. It'd be very news worthy if someone was confirmed to be re-infected. Given I haven't seen that news, I think I can conclude that immunity lasts at least six months in working age people.

Also, if I understand correctly, it has recently been shown that people who were infected with SARS 17 years ago still have memory T cells for SARS. (And, I think SARS is one of the viruses most closely related to Covid-19, and therefore there's reason to expect a long immunity period for it too).

"Memory T cells induced by previous pathogens can shape the susceptibility to, and clinical severity of, subsequent infections. <snip> We then showed that SARS-recovered patients (n=23) still possess long-lasting memory T cells reactive to SARS-NP 17 years after the 2003 outbreak." - from https://www.nature.com/articles/s41586-020-2550-z

abainbridge··on Data centers can slash CO2 emissions 88% or more (2013)
OK, I Googled. Making a new book takes 2.71 kg CO2e. https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1530-9290....
abainbridge··on Andean condor can fly for 100 miles without flapping wings
Yeah, true. But I've seen three bird calls that don't fit that pattern in my garden. Long tail tits seem to move around in small flocks, probably eating the insects in my trees. Every few seconds one of the flock flies to another tree. If the others don't follow, it flies back. While this is happening there is a constant chorus of little chirps. My guess is that they feel "attracted" to the centroid of the chirps, as a simple, almost mechanical way to keep the flock together (its hard to see each other amongst all the branches).

The other case is juvenile magpies. As adults I mostly hear them shouting aggressively at each other. But if the youngsters don't know I'm there, I've sometimes heard them chatting. The sounds they make are complex and quiet. A bit like this https://www.youtube.com/watch?v=8P4ZVgjslVQ but I've always seen them in pairs or groups when doing this.

Third is the Robin (European). They also have a whisper song. Sometimes they do it so quietly that I have to be within a few feet to hear it. And there's no other bird around. I guess it's a male who is just working on new material to impress the ladies with later.

abainbridge··on Linus Torvalds on AVX512
> That is simply not true.

I'm not claiming anything controversial. Power not having scaled as well as area recently is often referred to as the end of Dennard scaling:

https://en.wikipedia.org/wiki/Dennard_scaling#Breakdown_of_D...

> You can run the 64 Core on EPYC 2 all at once at 3Ghz all with Air Cooling.

That can be true despite the fact that power hasn't scaled as well as area.

> At every node they have reduced power consumption

Yep, just not as much as they improved area.

abainbridge··on Linus Torvalds on AVX512
> He didn't go into why vector instructions are hard to use efficiently, and hard for compiler writers, but I'd be interested if anyone here could explain that.

I have a simplistic explanation - maybe not what you're looking for but it is the best I can do...

At 12m23s in the video he says, "If you're working in a layer and the layers are well constructed (abstracted) you really can make a lot of progress. But if the top layer says, 'to make this really fast, go change the bottom layer', then its going to get all tangled up."

That's what implementing an algorithm on a SIMD architecture feels like to me. I have to figure out a way of filling my SIMD width with data each clock cycle, while in contrast, the specification of the algorithm deals with data one piece at a time.

Take insertion sort as a (bad) example.

    i ? 1
    while i < length(A)
        j ? i
        while j > 0 and A[j-1] > A[j]
            swap A[j] and A[j-1]
            j ? j - 1
        end while
        i ? i + 1
    end while
That algorithm cannot easily take advantage of SIMD. You have to change the algorithm to make it work with the architecture.

We'd probably say the algorithm is the top level of the abstraction stack, and the SIMD architecture is a level near the bottom. So this problem is the opposite way around to how Jim phrased it, but the point is that we have NOT got clean abstraction - an implementation in one layer depends on the implementation in another.

abainbridge··on Linus Torvalds on AVX512
What are the forces in chip design that are at play here? Over the last 10-15 years, fabs have continued to fit more and more logic gates per unit area, but haven't reduced the power consumption per gate as much. As a result, if you fill your modern chip with compute gates, you cannot use them all at once because the chip will melt. Or at least you can't have them all running at max clock rates. One solution is to increase the proportion of the chip used for SRAM (it uses less power per unit area than compute gates), this is what Graphcore have done. Another is to put down multiple different compute blocks, each designed for a different purpose, and only use them a-few-at-a-time. The big-little Arm designs in smartphones are an example of that. But I feel like AVX512 might be an example too. When they add ML accelerator blocks next, they also will not be able to be used flat out at the same time as the rest of the cores' resources.

I'm sure Intel should fix the problems Linus is complaining about, but I feel like chip vendors are being forced into this "add special purpose blocks" approach, as the only way to make their new chips better than their old ones.

abainbridge··on Exciting Days for ARM Processors
> they weren't particularly fast

I remember them being amazingly fast. I was comparing them to Amigas in 1987 though. The Motorola 68000 in the Amiga 500 was less than 1.0 dhrystone MIPS, while the Archemedes A3000 was about 4.0. For reference, the machines cost about £499 and £599 respectively in 1987.

As a result the frame rate, poly count and screen size in Zarch on the Archemedes was higher than Starglider II on the Amiga :-). Look https://youtu.be/MNXypBxNGMo?t=36, https://youtu.be/edDLqlG4quw?t=132

abainbridge··on The general tone is purple
My browser plugins avoided all that crap for me, but I was still frustrated by the tiny map images. The high resolution maps are beautiful: https://booth.lse.ac.uk/learn-more/download-maps and there's an interactive version that overlays Google Maps so you can see what happened to those "Vicious, semi-criminal" areas: https://booth.lse.ac.uk/map/14/-0.0736/51.5023/100/0
abainbridge··on Go vs. Crystal Performance
> Go outputs less instructions, but has to maintain its segmented stacks

I think they dropped segmented stacks in 2014: https://en.wikipedia.org/wiki/Go_(programming_language)#Vers...

The stack can still grow, but contiguously. I'm not sure if there are any instructions required to monitor the stack size and grow if it needed.

abainbridge··on Cuckoo++ – High-Performance Hash Tables for Networking Applications (2017)
Just to be clear, the paper is about an extension to Cuckoo hashing, while the link to the visualization is about standard Cuckoo hashing.

From the paper: "we describe algorithmical changes to cuckoo hash tables allowing a more efficient implementation. More precisely, our hash table adds a bloom filter in each bucket that allows to prune unnecessary lookups to the secondary bucket."

abainbridge··on There’s No Fire Alarm for Artificial General Intelligence (2017)
Haha. I guess that's what real people who work at my bank would say. But I'm not sure they possess general purpose intelligence either.
abainbridge··on There’s No Fire Alarm for Artificial General Intelligence (2017)
I think the broadness is the problem. If it wasn't broad, you could hard code answers to all the questions. Examples of some basic questions that have no chance of working today: "Do you remember that discussion we were having last time?", "I've scanned the document you want, can I paste it straight into the chat window?", "Is PDF format OK?", "Can you look at page 2 in the PDF?".
abainbridge··on Ask HN: What startup/technology is on your 'to watch' list?
There were automated railways 30 years before that too. https://en.m.wikipedia.org/wiki/Automatic_train_operation
abainbridge··on Imperial College London have released their Covid-19 epidemic simulation
Papers should not be accepted unless they are accompanied by high quality source code.

> IMHO the only valid criticism is if the the simulation modelling is sound and implemented accurately.

I think the best way to tell if it is sound and implemented accurately is to first require that it is implemented as simply (to understand) as it can be. Even then, it is hard to reason about code. But without simplicity, the problem is ten times worse.

I'm tempted to go further and say that source code is formalized thought. I've written a number of simulators in the past, sometimes purely to help me understand a system more fully. There's something beautiful about describing the behaviour of a system in elegant code. When there's nothing left to remove I get much greater confidence that I've fully groked the system. I'd say this is the area where the "computers are like a bicycle for the mind" quote is the most true.

abainbridge··on Vitamin D and Inflammation: Potential Implications for Severity of Covid-19
We evolved to be outside in daytime. Nerds spend lots of daytime inside. Skin in sunlight makes Vitamin D. In the absence of other information, it'd be surprising if Vitamin D supplements weren't beneficial.
abainbridge··on Imperial College London have released their Covid-19 epidemic simulation
OK, fair point. Snarkiest comment removed. My comments weren't meant to be serious. The problem I pointed out isn't actually a bug, it's just a style of programming that makes the code harder to read/work on than it needs to be.
abainbridge··on Imperial College London have released their Covid-19 epidemic simulation
This code is great fun. Start here to explore the horror: https://github.com/mrc-ide/covid-sim/blob/master/src/CovidSi...

I like the way InitModel() crashes (I think) if a global pointer called bmh (short for bitmap header) isn't first initialized by calling InitBMHead() from Bitmap.cpp. I guess it's obvious to academics with giant brains that InitModel() depends on a bitmap existing.

But it gets worse - the pointer is declared in CovidSim.cpp but Bitmap.cpp reaches across the module boundary to initialize it. Sweet.

Edit: I feel bad now. It's great that this code was made public. I should be encouraging that. I think academics writing code for things like this should probably take an undergrad course on software engineering. I think the one that taught me about Abstract Data Types would be most beneficial the author(s) of this code.

abainbridge··on 9M logs of Brits' road journeys spill from number-plate camera dashboard
Yes, GDPR is still law in the UK - https://en.wikipedia.org/wiki/General_Data_Protection_Regula...

As I understand it, under GDPR data controllers have a responsibility to take reasonable measures to secure the data. I believe failure to do so is a criminal offense.

abainbridge··on Better C – A subset of D Programming Language
You should probably address that. It's a serious competitor to D (as better C). At the very least, you might see some ideas worth stealing!
abainbridge··on Adult immune systems ‘remember’ germs to which they’ve never been exposed (2013)
Could someone add 2013 to the title? I just spent 15 minutes thinking I must be a genius because I had already figured this out. Now I realise I read about it already.
abainbridge··on Adult immune systems ‘remember’ germs to which they’ve never been exposed (2013)
No. The article says newborns don't have these activated CD4 cells.
abainbridge··on Libschrift: A lightweight TrueType font rendering library
Libschrift is about 1000 lines of code. Freetype is about 200,000. I'm pretty sure these projects have different aims. It is possible that refactoring Freetype to make it meet the aims of Libschrift would be harder than starting again.
← PreviousPage 8 of 18Next →