building and running deno 1.8 on a jetson xavier nx

I’ve been wrestling with building Deno on my Jetson Xavier NX running Nvidia’s version of Ubuntu 18.04.2 as part of L4T, or Linux For Tegra (although I tend to think of ‘T’ for Tensorflow). Deno is a reimplementation, if you will, of NodeJS in Rust, attempting to correct many of the bad design decisions that went into Node over time. Deno was created by Ryan Dahl, the original creator of NodeJS, so he should know where the skeletons of Node are buried.

The problem with installing and working with Deno on the Xavier is that it’s Arm-based, whereas all the other environments are x86-based. You can thus download and update (deno upgrade) Deno natively, whereas on the Xavier you need to install a native distribution of Rust, then build deno on the platform with cargo build deno. This worked for all of deno versions up to 1.6.7, then 1.7 was released and building deno on Arm failed repeatedly due to a failure to build librusty_v8. I filed a bug report over two weeks ago, and then, three days ago, I got a response from one of the devs telling me that there was “no pre-built 0.17.0 static library for aarch64 but there is one if you upgrade to 0.20.0.” Sure enough, when I re-ran cargo build deno and watched the task pull and build all the libraries, it pulled librusty_v8 version 0.20.0, which successfully built along with everything else. I have since closed the bug (see https://github.com/denoland/rusty_v8/issues/630 ).

The big draw for me is Deno’s experimental support for WebGPU API. I ran the example given in the release notes ( https://deno.land/posts/v1.8 ) and copied the results into the top of this post. I doubt that JavaScript running on Deno will replace Python as the front-end for ML running on the Jetson Xavier, but I can see it supporting Python, especially with web-based development. I am no fan of Python’s web frameworks, and I’ve lost my disdain for JavaScript over the past 12 months due to another task that showed I could use minimal JavaScript to cleanly solve a knotty problem. Deno also gives me plenty of powerful examples of programming in Rust, so there’s that angle.

Since retirement I’ve explored more interesting languages and their uses than I ever did in the last five years of my regular employment. It wasn’t so much ageism as it was my employer’s adamant insistence that development was their way or the highway. I’m now free to follow my own path(s) and finding what I’m learning to be new, interesting, and challenging in a good way.

basic performance test of two different solid state drives on the nvidia jetson xavier nx

I ran another set of tests today on the nVidia Jetson Xavier NX with the latest L4T, version 4.5, based on Ubuntu 18.04.5. I have two drives, a Western Digital Black NVME 250 GB drive mounted in the NVME slot on the bottom of the Xavier, and an SK Hynix 500GB SSD mounted to one of the Xaviers USB 3.1 connectors using a StarTech USB3S2SAT3CB adapter.

The two tests are at the top. I used dd to write a solid 1GB to each drive. Both are pretty fast for an SBC, with the NVME coming in almost twice as fast as the USB SSD. I should note that the Jetson’s USB write speed is three times faster than this same experiment run on the Raspberry Pi 4 using a USB mounted SSD.

These are not meant to be definitive performance tests. All I’m looking for is a simple measure of merit. Let somebody else who has that much time to waste go off and do the exhaustive nit-picky performance tests…

As for the SSDs, I’m something of a digital pack rat. When interesting technology falls well below $100, I usually pick up at least one of the item to experiment with. I picked up the Western Digital SSD when it had dropped to $60 on Amazon last year, and the SD Hynix drive when it dropped to $40. I use the Xavier for many things besides TensorFlow, such as an AARCH64 build machine, and I move the products onto the USB SSD to then copy onto other machines, such as the Raspberry Pi 3 and 4s I have ‘lying around.’

Performant technology is getting so cheap.

nVidia Jetson Xavier NX showing its four USB 3.1 ports