Writing An Optimizing Tensor Compiler From Scratch

Not everyone will write their own optimizing compiler from scratch, but those who do sometimes roll into it during the course of ever-growing project scope creep. People like [Michael Moroz], who wrote up a long and detailed article on the why and how. Specifically, a ‘small library’ involving a few matrix operations for a Unity-based project turned into a static optimizing tensor compiler, called TensorFrost, with a Python front-end and a shader-like syntax, all of which is available on GitHub.

The Python-based front-end implements low-level NumPy-like operations, with development still ongoing. As for why Yet Another Tensor Library had be developed, the reasons were that most of existing libraries are heavily focused on machine learning tasks and scale poorly otherwise, dynamic control flow is hard to implement, and the requirement of writing custom kernels in e.g. CUDA.

Above all [Michael] wanted to use a high-level language instead of pure shader code, and have something that can output graphical data in real-time. Taking the gamble, and leaning on LLVM for some parts, there is now a functional implementation, albeit with still a lot of work ahead.

Rare-Earth-Free Magnets With High Entropy Borides

Map of the calculated magnetic anisotropy. (Credit: Beeson et al., Adv. Mat., 2025)
Map of the calculated magnetic anisotropy. (Credit: Beeson et al., Adv. Mat., 2025)

Although most of us simultaneously accept the premise that magnets are quite literally everywhere and that few people know how they work, a major problem with magnets today is that they tend to rely on so-called rare-earth elements.

Although firmly in the top 5 of misnomers, these abundant elements are hard to mine and isolate, which means that finding alternatives to their use is much desired. Fortunately the field of high entropy alloys (HEAs) offers hope here, with [Beeson] and colleagues recently demonstrating a rare-earth-free material that could be used for magnets.

Although many materials can be magnetic, to make a good magnet you need the material in question to be both magnetically anisotropic and posses a clear easy axis. This basically means a material that has strong preferential magnetic directions, with the easy axis being the orientation which is the most energetically favorable.

Through experimental validation with magnetic coercion it was determined that of the tested boride films, the (FeCoNiMn)2B variant with a specific deposition order showed the strongest anisotropy. What is interesting in this study is how much the way that the elements are added and in which way determines the final properties of the boride, which is one of the reasons why HEAs are such a hot topic of research currently.

Of course, this is just an early proof-of-concept, but it shows the promise of HEAs when it comes to replacing other types of anisotropic materials, in particular where – as noted in the paper – normally rare-earths are added to gain the properties that these researchers achieved without these elements being required.

The Inner Workings Of The Intel 8086’s Arithmetic Logic Unit

In the 1970s CPUs still had wildly different approaches to basic features, with the Intel 8086 being one of them. Whereas the 6502 used separate circuits for operations, and the Intel 8085 a clump of reconfigurable gates, the 8086 uses microcode that configures the ALU along with two lookup tables. This complexity is one of the reasons why the Intel 8086 is so unique, with [Ken Shirriff] taking an in-depth look at its workings on a functional and die-level.

These lookup tables are used for the ALU configuration – as in the above schematic – making for a very flexible but also complex system, where the same microcode can be used by multiple instructions. This is effectively the very definition of a CISC-style processor, a legacy that the x86 ISA would carry with it even if the x86 CPUs today are internally more RISC-like. Decoding a single instruction and having it cascade into any of a variety of microcodes and control signals is very powerful, but comes with many trade-offs.

Of course, as semiconductor technology improved, along with design technologies, many of these trade-offs and disadvantages became less relevant. [Ken] also raises the interesting point that much of this ALU control technology is similar to that used in modern-day FPGAs, with their own reconfigurable logic using LUTs that allow for on-the-fly reconfiguration.

Did We Overestimate The Potential Harm From Microplastics?

Over the past years there have appeared in the media increasingly more alarming reports about micro- and nanoplastics (MNPs) and the harm that they are causing not only in the environment, but also inside our bodies. If some of the published studies were to be believed, then MNPs are everywhere inside our bodies, from our blood and reproductive organs to having deeply embedded themselves inside our brains with potentially catastrophic health implications.

Early last year we covered what we thought we knew about the harm from MNPs in our bodies, but since then more and more scientists have pushed back against these studies, calling them ‘flawed’ and questioning the used methodology and conclusions. Despite claims of health damage in mice, institutions like the German federal risk assessment institute also do not acknowledge evidence of harm to human health from MNPs.

All of which raises the question whether flawed studies have pushed us into our own Chicken Little moment, and whether it’s now time to breathe a sigh of relief that the sky isn’t falling after all.

Continue reading “Did We Overestimate The Potential Harm From Microplastics?”

Using 3D Printing And Copper Tape To Make PCBs

In a recent video [QWZ Labs] demonstrates an interesting technique to use 3D printing to make creating custom PCBs rather straightforward even if all you have is a 3D printer and a roll of copper tape.

The PCB itself is designed as usual in KiCad or equivalent EDA program, after which it is exported as a 3D model. This model is then loaded into a CAD program – here Autodesk Fusion – which is used to extrude the traces by 0.6 mm before passing the resulting model to the 3D printer’s slicer.

By extruding the traces, you can subsequently put copper tape onto the printed PCB and use a cutting tool of your choice to trace these raised lines. After removing the rest of the copper foil, you are left with copper traces that you can poke holes in for the components and subsequently solder onto.

Continue reading “Using 3D Printing And Copper Tape To Make PCBs”

Servicing The ‘Not Serviceable’ Bearings On A Vacuum Power Head

Everyone knows that bearings are a consumable wear item, and that the power head of a vacuum likely contains bearings that will eventually need to be replaced. Yet when the manufacturer wants you to toss out the entire roller and pay $80 for the privilege, that feels rather steep and unnecessary. In the case of [Mark Furneaux], the roller in the power head of his Filter Queen brand vacuum felt particularly over the top to toss, since it’s all fancy wood with very durable brushes.

One of the bearings had stopped being a bearing, resulting in the plastic that held it in place beginning to melt. Fortunately the damage hadn’t progressed to the point where printing a replacement was necessary, so instead it was time to figure out how to remove the bearings without permanent damage. The trick that the manufacturer used was to peen the ends of the metal shafts that the bearings fit onto, requiring some Dremel action to convince them to come off.

After some careful modifications like this, the remnants of the old bearings came off and their replacements could go on. Due to the metal shaft modifications, it is now mostly the plastic caps on either end which grip the bearings, but it seems to work well enough. For $2 in bearings and some labor on [Mark]’s end, he managed to keep a perfectly good roller brush out of the landfill, and future bearing replacements should be much easier.

Continue reading “Servicing The ‘Not Serviceable’ Bearings On A Vacuum Power Head”

Pi Compute Module Powers Fully Open Smartphone

With the powerful off-the-shelf hardware available to us common hardware hobbyist folk, how hard can it be to make a smartphone from scratch? Hence [V Electronics]’s Spirit smartphone project, with the video from a few months ago introducing the project.

As noted on the hardware overview page, everything about the project uses off the shelf parts and modules, except for the Raspberry Pi Compute Module 5 (CM5) carrier board. The LCD is a 5.5″, 1280×720 capacitive one currently, but this can be replaced with a compatible one later on, same as the camera and the CM5 board, with the latter swappable with any other CM5 or drop-in compatible solution.

The star of the show and the thing that puts the ‘phone’ in ‘smartphone’ is the Quectel EG25-GL LTE (4G) and GPS module which is also used in the still-not-very-open PinePhone. Although the design of the carrier board and the 3D printable enclosure are still somewhat in flux, the recent meeting notes show constant progress, raising the possibility that with perhaps some community effort this truly open hardware smartphone will become a reality.

Continue reading “Pi Compute Module Powers Fully Open Smartphone”