Better HN
topnewbestaskshowjobs
Log inSign up

petrpravda

25 karma · joined Sep 16, 2026 (2mo ago) · 11 submissions

Submissions

1.

PostgreSQL 19: A hands-on tour with runnable browser examples(certuvia.com ↗)

49 points · by petrpravda · 2w ago · 4 comments

2.

Birthday Paradox Notebook(nablatensor.com ↗)

2 points · by petrpravda · 4w ago · discuss

comment 1mo ago · link · parent

I maintain jax4j, an Apache-2.0 tensor library for Java. This notebook lets you edit Java code and compare CPU and browser WebGPU results without installing a JDK.

Source: https://github.com/nablatensor-dev/jax4j

I’d welcome feedback on the API and reports of browser/GPU compatibility.

4.

Jax4j: NumPy-style tensors and automatic differentiation for Java(nablatensor.com ↗)

5 points · by petrpravda · 1mo ago · 1 comment

comment 2mo ago · link · parent

We engineers are cooked. As Dario says, programming is a solved problem.

6.

Can Java's Adjoint Automatic Differentiation Compete with C++?(nablatensor.com ↗)

4 points · by petrpravda · 2mo ago · discuss

comment 2mo ago · link · parent

Author here. Started because of one number: our Vulkan kernel does 125M paths/sec pricing this tape, but drops to 15M once you also ask for the five adjoint Greeks -- 8x slower, vs. 1.7x on CPU for the same request. Turned out to be a register-spill problem, not an arithmetic one: the reverse sweep needs ~760 forward values per path and a GPU lane doesn't have room.

Fix is checkpointing (Griewank's 1992 "revolve," same idea modern LLM training uses under "gradient checkpointing"): keep ~38 bookmarks instead of 760 values, recompute what's needed when the reverse sweep asks for it. 2.9x, or 6.8x batching four markets per dispatch, bit-exact vs. the original.

One fun problem along the way: the compiler kept noticing the recomputation was identical to the original and merging them back together (undoing the whole point), so I had to XOR every bookmarked value with a runtime-zero constant just to stop it from proving that.

8.

Forget, then remember: checkpointing the adjoint sweep on a GPU(nablatensor.com ↗)

1 points · by petrpravda · 2mo ago · 1 comment