May 6, 2009

French Bank Takes On GPU Computing

Michael Feldman

This week’s launch of NVIDIA’s “Preconfigured GPU Clusters” program, which we covered on Monday, got me to thinking about how far and how fast GPUs have entered the HPC mainstream. To be sure, actual production deployments are not yet commonplace, at least not visibly so. And there’s the rub. Most commercial firms would rather keep their use of cutting-edge technology hidden from competitors. For GPU computing in areas like financial services and oil & gas exploration, this is especially true.

That’s why I was somewhat surprised when Paris-based BNP Paribas, a European banking and financial services company, granted me an audience with Stéphane Tyc, the head of Global Equities & Commodity Derivatives Quantitative Research in the firm’s Corporate and Investment Banking Division. In March the company announced it was using NVIDIA gear and CUDA to speed up some of its pricing models.

Besides being open to talking about the company’s adventures in GPU computing, I got a sense from Tyc that the financial services culture there was rather different from that in the US. For example, Tyc and his group are big advocates of open source and are encouraged to contribute to that effort. “When I have people on my team that want to contribute to free software — that’s great,” he told me. Keep in mind that we’re talking about a commercial organization that has to answer to investors and its financial customers. Although the analytics codes his team develops are all proprietary, they’re willing to devote company time to improving open source tools and libraries.

The analytics software they’ve developed is an advanced version of Black-Scholes used to price hundreds of thousands of equity derivatives. The whole package is around a million lines of source, but the code they ported to CUDA — a minimization procedure used to calibrate the parameters of Monte Carlo simulations — is only one or two percent of the total. According to Tyc though, that single procedure uses about 10 percent of the processor cycles.

Accurate derivative pricing requires a lot of floating point horsepower, so the FP capability of the hardware is directly proportional to how fast it can deliver useful results. Using just two of the four GPUs on an NVIDIA S1070 board, they were able to achieve a 15-fold performance increase and a 100-fold power improvement in performance per watt in this one procedure.

Tyc noted that part of the performance pickup was a result of modifying the algorithm to use single precision floating point. For x86 CPUs, single and double precision operations execute at essentially the same speed, which tends to make a lot of developers lazy about choosing an efficient implementation. But for GPUs, single precision is 5 to 10 times faster, hence the motivation to change the algorithm.

The advantage to all this code noodling is that they can actually do pricing re-fits during the day. With a CPU-only platform, they would set the job to run overnight and collect the data the next day — not an ideal situation for traders.

As of March, the CUDA-ized version of the pricing model hadn’t been deployed for live trading, but Tyc was impressed enough to start thinking about porting more codes and making use of additional GPUs. One challenge for them is that a lot their software is written in Ada. (Apparently in France, style and elegance still count for something, even in software.) If they had used C or Fortran, they could have turned to PGI or CAPS, which offer tools that can transform these high-level languages into GPU code. For the time being, Tyc’s team will probably continue to use the gold digger approach and manually convert the most computationally-intensive source into CUDA.

Longer term, they are looking at OpenCL as a way to get their GPU implementation onto a hardware-independent code base. Although the choices today for GPU computing are limited to NVIDIA and AMD(ATI), Intel is planning to launch its first GPU-like Larrabee chips within a year, and all three vendors are likely to offer OpenCL support. At that point platform independence could look much more attractive than it does today. As pleased as Tyc is about the early results from the NVIDIA solution, he said they would rather not be tied to a specific vendor and will certainly take a hard look at Larrabee when it shows up.