HNHacker News
TopNewBestAskShowJobs

frogblast

598 karma · joined May 5, 2020

submissionscomments
frogblast··on How to get 1.5 TFlops of FP32 performance on a single M1 CPU core
It is available via public APIs, but the hardware instructions themselves are not documented. This lets the instructions change in future CPUs, vs having the ISA be baked in stone forever.

Example: AMX predated the standard ARM matrix multiply instructions. Perhaps Apple will add the ARM versions someday and now can remove AMX without breaking compatibility. Or maybe there will be a non-additive AMXv2.

frogblast··on ‘Porch pirates’ stole an estimated 260M packages in 2021
Regarding having drivers respect preferences...

Shippers end up eating the cost of these packages, and they are making an economic tradeoff: Slower deliveries by following preferences vs. eating the cost of loss. They are choosing the latter. Maybe they haven't done the analysis right, or maybe the overall costs really are lower that way.

frogblast··on Waymo's collision avoidance testing
Well… Yes. It is a scenario where you you have a blind spot on the road ahead of you, so I’d hope a human driver would do the same.
frogblast··on Emulating double precision on the GPU to render large worlds
The 2xFP32 solution is also dramatically faster than FP64 on nearly all GPUs.

While most GPUs support FP64, unless you pay for the really high-end scientific computing models, you're typically getting 1/32nd rate compared to FP32 performance. Even your shiny new RTX 4090 runs FP64 at 1/64th rate.

2xFP32 for most basic operations can be 1/4th the rate of FP32. It is quite often the superior solution compared to using the FP64 support provided in GPU languages.

frogblast··on Former NSA Employee Arrested on Espionage-Related Charges
I recall a news story from a few years ago (can't find it now)...

There was once a bank that looked the other way when lots of shady cash came in, allowed transfers of those amounts to to foreign banks, basically ignored KYC rules, etc. Word got around, and lots of criminals all over started using this bank for all of their money laundering purposes.

Some banking authority started noticing a lot of suspicious transactions, and was preparing to shut the whole thing down, disconnect the bank from all transfers, raid offices, arrest employees, trumpet press releases about how they're protecting the American financial system, etc... (ie, exactly what they are supposed to do).

The bank was, of course, a honeypot run by some other 3-letter agency, who was actively facilitating money laundering in order to collect enormous amounts of info about who was involved.

(basically the banking version of that 'encrypted phone' scheme).

The raids were mere hours away when someone put two and two together, and managed to get it called off.

frogblast··on System memory allocator free operation zeroes out deallocated blocks in iOS 16
Malloc doesn't guarantee zero filling memory, but ObjC and Swift currently need to zero memory immediately after malloc returns it, and they both share C's malloc pool.

This makes a lot more performance sense for those languages.

frogblast··on California sues Amazon for preventing 3rd-party sellers being cheaper elsewhere
Because Amazon can arbitrarily raise the prices of goods sold at Amazon, and have no concern about being undercut.

For example, you are selling a Widget for $20. Amazon says "we'll take $10 of that ourselves". You can sell your Widget elsewhere at lower overhead, but you can't pass those savings on to the buyer, which means the buyer has no incentive to shop elsewhere, which means there are no market forces encouraging Amazon to reduce their cut.

There are also no market forces preventing Amazon from increasing their cut. Tomorrow, they'll want $15 of that $20.

frogblast··on Strava abruptly ends 3rd party data sync to Apple Health
What you wish for is exactly what HealthKit is. All app access is gated by ACLs that require per-app and per-record-type user approval, and always encrypted when transmitted off of your device. This is a quote from the Apple Health Privacy Policy:

> When your device is locked with a passcode, Touch ID, or Face ID, all of your health and fitness data in the Health app — other than your Medical ID — is encrypted and inaccessible by default. Additionally, if you are using iOS 12 or later and turn on two-factor authentication, Apple will not be able to read your health and activity data synced to iCloud.

The two factor authentication is the mechanism for key distribution such that HealthKit data can be synced and migrated between your own devices, without being decryptable by apple.

frogblast··on US Sanctions Vladimir Putin
> So given no effective sanction options and no military options, the US and the EU should've realized the only way to defuse this situation was to negotiate. Yet Biden categorically ruled out the possibility of formally refusing to admit Ukraine to NATO, something that was never going to happen anyway.

You undermine your own argument. Ukraine's admission was never going to happen anyway, and everyone knows it. Putin also knows it. So that isn't why he is invading.

Arguments about NATO membership or repressed Russian speaking minorities and anything else (you get different justifications for the war depending on where you are in the world...) are fig leafs to exploit people's existing opinions of particular parties (in your case, about the US throwing its weight around).

The reality is far simpler: Putin wants the Ukraine personally. His own private reasons are irrelevant. He wants it. And he has the will and capability to take it. And so he is doing so.

I'm going to pick one one part of your statement in particular:

> US and the EU should've realized the only way to defuse this situation was to negotiate

Putin wants Ukraine. Negotiation of any kind was never going to prevent this invasion, unless the concession surrendering without a fight and having Putin install a government of its choice.

frogblast··on Los Angeles is gearing up to ban wood-frame construction
In California that is defined as the “Wildland/Urban Interface”. That zone has been subject to much stricter building codes since 2008. Timber frame homes are allowed, as other factors (venting, roof material, rain gutters, roof material, siding material, landscaping) are dramatically more important.

The vast majority or LA county homes are not in a WUI zone, so wildfire extent can’t be used as an argument for this.

frogblast··on Apple’s new M1 Pro and M1 Max processors
You can always run Linux in a VM too
frogblast··on size_t-to-int vulnerability in Linux’s filesystem layer
In swift:

    //  a is a UInt64
    let a = Int.random(in: 0..<Int.max)
    
    //  causes a fatal runtime error if out of range, halts execution
    let b = UInt32(a)
    
    //  returns a UInt32?, which will be nil if out of range
    let c =  UInt32(exactly: a)
    
    //  another approach for exact conversion:
    guard let d = UInt32(exactly: a) else {
        //  conversion failed
        //  handle error and return
        return
    }
    // 'd' is a UInt32 without any bits lost
    
    //  always succeeds, will return a UInt32, either clamped or truncated.   Truncation just cuts off the high bits.
    let e = UInt32(clamping: a)
    let f = UInt32(truncatingIfNeeded: a)
frogblast··on Toyota launches groundbreaking 10-year warranty (in UK)
I have a 2 year old Niro EV with 20K miles. It is a fantastic little car, no issues or defects with it all so far. The dealership experience sucked, but that’s not the car’s fault.
frogblast··on Cerebras’ new monster AI chip adds 1.4T transistors
Are there any good resources out there describing in practice how existing training workloads are distributed among GPUs? (using tensorflow, pytorch, or whatever else?).

I'm curious how the problem effectively gets sliced.

frogblast··on California plan for wealth tax on anyone who spends 60 days a year in the state
This is fearmongering. The bill was introduced a year ago, went nowhere, and is now dead. This WSJ article was published a month after the bill was officially killed…

The broader legislature has no interest in such a tax.

This is the bill in question: http://leginfo.legislature.ca.gov/faces/billStatusClient.xht...

Edit: also note that this article is on the WSJ opinion page, and didn’t come from the news desk.

frogblast··on Boeing's upgraded 737 Max completes first flight with media onboard
Covid’s timing was devastating for Boeing and the 737 Max.

When the planes were grounded, Boeing kept producing them assuming the issue would be resolved quickly. As of January 2020, slightly before Covid, they had 400 planes built, but not delivered to customers (and so customers haven’t paid for them). Boeing was funding these aircraft with debt.

All of a sudden, demand for air travel drops off a cliff.

All those airlines now decide “I’m just not going to take delivery of those aircraft”. Which also means “I’m not going to pay for them”.

Had the timing gone in the other order, all of those aircraft would have been delivered, and paid for, and airlines would have been holding the bag. (and the covid crisis would have limited the damages airlines could claim, and thus demand from Boeing, if they could meet their reduced schedules with other aircraft).

frogblast··on Intel's disruption is now complete
Apple’s core is very wide. But wide usually means very high power consumption.

M1 apparently has much lower power consumption.

So something else is going on other than “Apple is willing to spend more to make cores wider”.

frogblast··on Docker fails to launch on Apple Silicon
Right, lots of confusion in this thread.

A12Z/DTK: HW does not support virtualization at all.

Apple M1 / New Apple Products: HW does support virtualization for ARM64 guests (both windows and linux demonstrated).

What about x86 software in the guestOS? Not with Rosetta. Instead, the guest OS will have to provide its own translation (such as windows/arm's current x86->arm64 or upcoming x86_64->arm64 feature). I'm not familiar if there is any usable high performance x86_64->arm translation available for linux.

Docker w/ arm images: needs some work to be able to work on mac/arm virtualization, but it's coming.

Docker w/ arm linux kernel + x86 userland images: Any translation solution would be found within the linux guestOS, not macOS. I don't know if any candidates exist. Maybe qemu?

Docker w/ full x86 image (incl. kernel): I don't think this is possible?

frogblast··on Swift System Is Now Open Source
The primary feature of Swift is that it a more safe language (via many of the same mechanisms in languages you referred to above), while being extremely compatible with the extremely large API surface area of iOS/macOS (which is both in C and Objective-C), and allowing incremental adoption without having to rewrite existing application/library code.

To have adopted any of those other languages requires dramatic changes to a huge amount of platform APIs, along with on-going challenges of divergence. Put another way, any other language would have basically forked the entire platform.

The Swift developers definitely have ambitions beyond being a compatible with Apple's existing SDKs, but that's the fundamental thing Swift does that no other language can do.

frogblast··on Paper maps, two-way radios: how firefighting tech is stuck in the past
I'm not involved in firefighting, I just spend a lot of time with maps planning out hikes:

I find that paper maps are dramatically better for me than anything on a screen, simply because they can be so much bigger and higher resolution at the same time. It is far easier to get a feel for an area on a table-top sized map printed at high PPI than on my 4K 27" monitors.

As for rapidly tracking the fire perimeters: Despite what the original article says, this mapping process is already happening. You can see the very outlines updated daily, with lots of fine detail, on inciweb.

frogblast··on Traffic Prediction with Advanced Graph Neural Networks
I live in an area strongly impacted by Google making ‘individually optimal’ decisions for each driver, and actually leaving those drivers in a dramatically worse situation.

I live in a rural area, between a major population center and a major resort area, with one major highway and a few small back roads that provide alternate paths for part of the highways route. Every summer weekend the highway becomes highly congested.

Google quickly starts routing people down the back roads because of a 30 minute delay on the highway. A sudden crush of cars hits these back roads, and they end up gridlocked for 3-4 hours. Google then realizes traffic is literally stopped on these roads, and stops sending new traffic down those routes. But the people already on them are still stuck for hours.

It gets smelly when a bunch of drivers take a shit on the side of the road because they can’t go anywhere else, and leave it there.

All because Google simultaneously made an ‘individually optimal’ decision for a whole bunch of individual drivers at once.

——

Another example in the same area actually causes a backup on the highway itself. Google started suggesting one back road that required an unprotected left turn across oncoming traffic on the highway, to avoid a 10-15 minute delay further on the highway. Drivers dutifully followed directions by getting into the left turn lane.

The drain rate of the left turn rate is slow because oncoming traffic is also high. The left turn lane fills up, and one driver with directions to turn then stops in the traffic lanes to wait for room to get into the turn lane. And suddenly the highway is now encountering 2-3 hour delays that don’t clear for most of the day.

frogblast··on Android 11 is taking away the camera picker, forcing use of the built-in camera
I’m not following the privacy issue: The UI shown in the screenshot requires explicit opt-in to which app is launched, so the user has consented to that app receiving the image that is taken?

I’m also not immediately seeing a non-privacy reason to make this change either...

frogblast··on U.S. FAA proposes requiring key Boeing 737 MAX design changes
This is what I don't get. If the solution is "install a AOA Disagree light, and disable MCAS in that scenario", why has it taken two years to develop this solution?
frogblast··on Is your chip card secure? Much depends on where you bank
A contactless card just proves physical possession of the card. An Apple Pay payment means that a password or biometric authentication was performed, AND possession of the device, which raises the barrier to fraud. So there is a good reason to wanting to discourage the use of the card when possible.
frogblast··on macOS 11: copies of dynamic libraries are no longer present on the file system
You're correct. For 3rd-party provided dylibs, it also isn't necessary to get them into the system cache.

dlopen() will look for the dylib first (as today), and if the file doesn't exist, it'll look in the shared cache.

So the only people this actually impacts are those who stat() system-provided dylibs before calling dlopen(). They should just skip the stat(), and go straight to calling dlopen().

Certainly not worthy of the end-of-the-world vibes in the twitter thread...

frogblast··on TSMC officially begins 5 nm production
The 1080 and the rumored 3080 are not the same architecture: they didn't just get die shrunk.

For the same number of SMs, you're also paying substantial area for the tensor cores, ray tracing acceleration, independent thread scheduling, different I/O to support memory technologies, more NV link, larger caches, etc. That stuff didn't happen for free.

A simply die shrunk 1080 would have had more TFlops than what we have, but it wouldn't be as interesting of a product.

frogblast··on An History of Nvidia Stream Multiprocessor
The tensor cores are basically more efficient because they don't implement a 'read from register file; execute one instruction; write to register file'-style architecture:

They are basically a big array of ALUs hard-wired in a grid to do a matrix multiply: The connectivity between ALUs is baked into silicon: no general purpose register file to hold the intermediate results, just wires directly from the output of one ALU into the input of the next (well, and registers for pipelining).

No overhead for register files, instruction decoding, instruction scheduling, load/store units, cache, etc. (load/store is handled by the usual SM instruction set).

This is basically the same concept you find in any "AI acceleration" hardware (Google's TPUs, various neural-thingys you find in Phones, etc).

As for using in games, this hardware is generally idle, except for a few cases (typically because Nvidia did the work to light them up):

- upscaling from lower resolution rendered products to higher resolution (Nvidia markets this under the name "Deep Learning Super Sampling"), which is basically taking a derivation Temporal Anti-aliasing and mapping it onto the tensor cores to exploit that hardware

- Doing CNN-like denoising and reconstruction of a noisy ray traced image.

← PreviousPage 2 of 2