Stephen Smith's Blog

Musings on Machine Learning…

Archive for September 2020

What’s Next for ARM and RISC-V?

with one comment

Introduction

There have been some interesting developments in the world of CPU chips this past week. In this article we’ll look at what’s happening in the ARM and RISC-V worlds. Sure both Intel and AMD have been making interesting announcements, but these feel like more of the same, so if we cover these at all, it will be in a separate article. Here we’ll look at the nVidia purchase of ARM and the responses from some of the major players. RISC-V is finally starting to announce some mainstream CPUs and it couldn’t come at a better time, with people looking for alternatives to ARM, in case they have problems with nVidia.

nVidia Buying ARM is Official

Last Sunday, the news articles started to appear about Softbank’s sale of ARM to nVidia for 40 billion in cash and stock. This isn’t a done deal as there is a certain amount of opposition that could make regulatory approval difficult. I think this could prolong approval, but I suspect it will go ahead. There is speculation that the Chinese government could derail the sale, but I don’t think so as this really mainly involves Japanese, British and US companies and any Chinese involvement is minor. There has been opposition in the UK to this deal, but this comes across as hypocritical as the same people were all for the sale to Softbank when they would directly profit from the deal, but now that it’s the Japanese making the money they are against it. Ultimately I don’t think this will cause jobs to move from the UK to US as the skilled workers required are in such short supply that everyone has to be well taken care of.

Let’s look at the main companies that are heavily invested in ARM technology and how they might be affects:

Apple

If Apple was going to be negatively affected by this deal, they could have easily outbid nVidia and bought ARM themselves. The fact that they didn’t shows they aren’t overly concerned. Further Apple licenses the ARM instruction set, not the actual CPU cores since Apple designs these themselves. Apple is moving ahead full steam with releasing new ARM based CPUs. They just released an iPad Air with their new A14 CPU, an extremely powerful ARM multi-core processor based on TSMC’s new 5nm technology. These new CPUs will power the next generation of iPhone and Mac’s as well.

Samsung

Samsung produces their Exynos line of ARM processors. Samsung also manufactures all the processing chips used in nVidia graphics cards. nVidia is already one of Samsung’s biggest customers and I’m sure they are happy with this deal.

Qualcomm

Qualcomm makes many of the ARM processors used in Android phones. Their expertise is adding cell phone radio components to the chips to produce all-in-one cell phone systems on a chip. I don’t think Qualcomm is threatened by this deal and might like ARM being owned by a fellow American company. This would be similar for Broadcom and MediaTek.

Intel

Intel is feeling threatened both by ARM and AMD in the processor world. Further they are threatened by TSMC and Samsung in the chip manufacturing business. I think their bigger worry is TSMC, as their processors would be much more competitive if based on a better chip technology. Intel won’t be happy about all the attention ARM is given, but whether Softbank or nVidia own ARM is a bit of a wash for Intel.

AMD

AMD has been doing quite well integrating their graphics technology into their CPU chips. This has been a big competitive advantage for them. Now though they face competition from Intel integrating their Xe graphics into their CPUs and now from nVidia producing ARM processors with integrated nVidia graphics. AMD will see this as a major threat to both their CPU and graphics businesses.

Microsoft

Microsoft has been supporting ARM chips with limited versions of Windows. If more ARM based laptops start appearing, Microsoft is going to have to produce a proper full version of Windows for ARM. Microsoft lags Apple in emulation technology and is going to have a harder time supporting older Intel only programs on these new computers.

What About RISC-V

This past week, my blog articles on RISC-V have spiked in readership. I can only assume that the pending sale of ARM has stimulated intense interest in RISC-V as an alternative that isn’t owned and controlled by one company. This is combined with SiFive the company that consists of the people that designed the RISC-V instruction set has announced a number of new CPUs that they claim will lead to affordable desktop PCs and servers. We previously blogged that until there is an affordable RISC-V SBC similar to the Raspberry Pi that adoption will remain limited to a few specialized applications.

If one of the various proponents of the RISC-V can bring a 64-bit multi-core based computer to market for a couple hundred dollars or less with at least similar functionality to a Raspberry Pi then people will really take notice. Until they do that they are consigned to specialty IoT and Arduinno type applications.

Summary

Change always puts people on edge and nVidia purchasing ARM from Softbank is certainly a big change. Whether it turns out to be a change for the good, bad, indifferent or ugly is yet to be seen. Assuming this giant deal can pass the necessary regulatory approvals, then towards the end of next year we’ll start to get an idea of where things stand.

In the meantime, this is a great opportunity for the RISC-V camp to gain some traction. They need to show their open hardware approach which is free of all licensing fees can work and produce competitive general purpose computer CPUs.

Written by smist08

September 18, 2020 at 1:43 pm

Posted in Business

Tagged with , , , , , , , ,

Learning to Fly

with 3 comments

Introduction

Microsoft recently released their Flight Simulator for 2020. This version stands out because it includes landscapes for the entire world. I can take off from YVR, fly over downtown Vancouver, Lions Gate Bridge, out over West Vancouver, Horseshoe Bay, Howe Sound, over my house in Gibsons and then land at Sechelt airport. In this blog article I’ll describe a few discoveries and some of my first impressions. I’m not a pilot and I haven’t played Microsoft Flight Simulators since the 80s but I did play a bit with the latest version of X-Plane.

Taking off from Vancouver Intl Airport

Besides the impressive landscapes, the graphics include almost photo realistic views of your plane, the cockpit and the weather. There is a nice selection of planes to try out, all very detailed.

Flying towards downtown Vancouver showing cockpit view.

You can buy Flight Simulator standalone (around $70), but I bought an X-Box PC game pass which gives me access to a whole slew of games, though Flight Simulator is the only one I’ve installed. It was only $1 for the first month and then $7 for each month after (at least for now). This is a really good way to try before you buy since you can cancel this anytime and you only pay each month.

Approaching downtown Vancouver

First the Downsides

Flight Simulator is a very impressive program, however like any initial release of such a large program there are a few downsides and incomplete features. Here I’ll list a few things I ran into or are commonly reported. This looks like a long list, but none of these put me off playing the game.

  • It takes a lot of disk space, it needs 158Gig to install and ends up using 130Gig or so once installed. Even with all this local data, the program still requires a connection to the Internet to download scenery from the Internet as it runs. This data needs to be quickly available so ideally installed on an NVMe SSD drive. I.e. not on an external USB drive. Even with an NVMe drive, it still takes several minutes to start the program.
  • Lack of multi-monitor support. You can’t have one monitor show the instruments and another the view out the window, or have more monitors to show the side windows. This support is promised in the future, but not sure when. Without this you can’t build a full fancy realistic garage flight simulator.
  • The installation doesn’t check prerequisites correctly. It required me to update Windows 10 before installing, then it happily installed. However the program wouldn’t work until I updated my nVidia drivers. Just a quick Google revealed what to do, but it would be nice if the installation program had pointed this out. Especially since I have the nVidia control center set to auto-update, so my drivers weren’t that old.
  • Lack of supported hardware. I guess this is a matter of Flight Simulator being a victim of its own success. I ordered a flight yoke controller, but these are all sold out and chances are I won’t get it for another month or so.
  • Without the yoke, I had to use the keyboard, but I’m running on a laptop and the keyboard layout in Flight Simulator defaults to extensively using a numeric keypad that laptops don’t have. I would have expected the install program to configure the keyboard correctly for my computer. As a workaround I’m using an external keyboard with a numeric keypad (which I’m now sharing with my Raspberry Pi).
  • The processing demands of Flight Simulator are pretty high, I’m running a gaming laptop with a 9th generation i7, 16Gig RAM, nVidia 1650 and Samsung NVMe SSD. Flight Simulator configures itself to medium power for this (there are two higher settings). But it does run well this way, even if the graphics aren’t quite up to some of those posted on various websites.
  • The core program is inexpensive, but then there are a lot of expensive upsells in the marketplace. Haven’t bought any yet and with my current computer most don’t make sense, like higher resolution airport renderings.
  • To be nit-picky, the scenery files for some areas are a bit old. For instance, in my neighborhood I can tell the aerial photography is at least five years old by which houses are built or not built.
Flying over the Lions Gate Bridge.

Now the Upsides

Here are the things I like about the simulator:

  • The training modes are quite good. They taught me the basics of flight, taking off and landing. They go a bit beyond the tutorials in X-Plane teaching landing patterns and radio usage. Once you can take off and fly, you can explore the world. There is an AI co-pilot that can take over at any time.
  • I find the plane easier to fly in Flight Simulator than X-Plane. Sadly I’m still using a keyboard rather than a yoke, but it was easy to get the hang of controlling the plane.
  • The simulator is deep. From weather to pre-flight checklists to tower radio interactions to detailed instrumentation, this is a very detailed simulation. If you are an aspiring pilot then you can go a long way here.
  • To repeat, the scenery is fantastic and the ability to fly anywhere in the world is amazing.
  • With the core product there is a good selection of planes to choose from. If you want more you have to spend extra. There is also an SDK where people are developing add-ons, some silly, like adding Godzilla to San Francisco Bay.
  • This product is really designed for the next generation of computers and hardware, but even so I find it works quite well on my laptop and I’m happy with it. But it does make me consider building a gaming desktop with an nVidia Ampere graphics card.
Flying over Horseshoe Bay looking up Howe Sound.

Summary

Overall the positives far outweigh the negatives and I enjoy flying around familiar places. There are lots of challenging airports to land at and a good selection of planes to learn about. This program is both educational and fun. It’s too bad that all the good flight simulator hardware is sold out. It is expected that this program alone is going to generate over 3 billion in hardware sales. In this pandemic world, this program lets you explore a bit of the world from the distance of how high you are flying without leaving your house.

Flying over my house in Gibsons (note the lack of neighbors).
Coming in hot to land at Sechelt.

Written by smist08

September 11, 2020 at 4:04 pm

A Renaissance of Parallel Processing

leave a comment »

Introduction

At one time not too long ago, parallel programming was the domain of the supercomputer where specially crafted programs ran to solve large scale scientific problems in areas like meteorology. Now all of a sudden computer hardware to perform parallel programming is everywhere from cell phones to gaming computers to modern supercomputers. In this article, we’ll explore some of the reasons this has come about and look at how you can exploit these resources on your devices.

What Performs Parallel Processing?

Computers have always given the illusion of parallel processing. All modern operating systems allow multiple programs to run at once, but they all share the CPU. Each program is given a small (subsecond) timeslice to run in, and when its time is up, the next program is given a slice. We perceive this as parallel programming, but it isn’t, it’s just that the brain operates at a slower frequency than the computer and perceives the computer as running multiple programs in parallel.

Multicore CPUs

Originally a CPU contained one processing core, but with modern (but old now) processors like Intel’s original Core 2 Duo, processors have been sporting multiple cores where as long as there isn’t a conflict for a shared resource, then multiple programs can run at once. Today most higher end processors can have eight or more cores allowing a much better level of parallelism.

SIMD Coprocessors

Single instruction multiple data (SIMD) processors are added to CPU cores. These can typically execute a single floating point instruction on up to ten values at once. Sometimes this is referred to as vector processing. The ARM CPU has its NEON coprocessor and Intel CPUs have their AVX instructions. The instructions supported by these coprocessors are tailored to algorithms that can be easily parallelized like matrix multiplication or most encryption/decryption schemes.

GPUs

Graphics Processing Units (GPU) are typically expensive add-on cards to allow PCs the ability to play photorealistic 3D graphical games. nVidia just released their Ampere based GPUs that have an incredible speed boost over the previous generation. These GPUs are not just for graphics, their processing units are general purpose and programmable. These GPUs are capable of SIMD calculations, but a top of the line nVidia 3090 card can process 10,000 calculations at once. AMD and Intel are releasing competing graphics cards over the next several months.

CPUs with GPUs Integrated

AMD has started integrating GPU processing cores into their CPUs. Besides providing better integrated graphics, they offer better parallel processing capabilities than the CPU’s SIMD processing units. These AMD CPUs have a big advantage over Intel CPUs with their AVX instructions. This is the main reason that Intel has developed a new graphics technology called Xe. They maintain they will produce standalone graphics cards to compete with AMD and nVidia. But the real reason is that they need to compete with AMD and their integrated GPUs. The latest generation of Intel laptop processors contain a number of these new graphics processors built in.

In the ARM world, nVidia has produced chips with ARM cores and nVidia graphics processing cores. These are contained in their Jetson and Xavier Single Board Computers.

AI Processors

AI Processors are essentially GPUs, but without any circuitry to support graphics. They just contain the processing cores. nVidia, Google, Apple and Amazon among others produce these. They are called AI processors since they are good at matrix multiplication which is the heart of most neural network AI algorithms. Note that most graphics transformations are also represented as matrix multiplication which explains why GPUs are so good at AI applications.

Parallelization over a Network

Another way to divide and conquer large processing problems is by distributing the problem over a set of networked computers. How to do this is a separate problem, but often it is combined with what we are talking about here to get even more processing dedicated to a problem. Folding@Home breaks the problem up and assigns work units to individual computers to solve, hopefully using their GPU. Then the central servers combine all the results to get the final solution.

Programming and OpenCL

Most of these solutions have SDKs and you can program them using Assembly Language. However an Assembly Language program will only target one specific bit of hardware, though admittedly really well. If you want to write a single program that will run on all these platforms, one alternative is OpenCL where you write the code that will run on the parallel processor in a subset of C and then the OpenCL system will compile it whatever is appropriate when you go to run it. This is what Folding@Home uses to wring the most out of your computer. This is why Folding@Home works so much better if you have a GPU (whether AMD or nVidia).

People complain that OpenCL has too much overhead and complexity and that you are better off using the vendor’s native SDK. However, for instance, nVidia’s CUDA shares a lot of similarities with OpenCL to allow CUDA enabled programs to run on all the various generations of nVidia hardware. The advantage of OpenCL over CUDA is that it runs on all hardware, including AMD, nVidia, Intel, Apple or ARM. In fact, most vendors provide highly optimized OpenCL programs for common algorithms, so they will run really well on their hardware.

Summary

If you are interested in playing with parallel programming and you have a gaming PC, you have the power of a not very old supercomputer. When you look at the power of the various AI, graphics and other computational work that even your cell phone performs, it’s pretty amazing. Classical computer languages typically won’t take advantage of all these resources, but with a tool like OpenCL you can really enhance the performance of your programs.

Written by smist08

September 4, 2020 at 4:53 pm