Skip to main content
QUICK REVIEW

[論文レビュー] Fast exact summation using small and large superaccumulators

Radford M. Neal|arXiv (Cornell University)|May 21, 2015
Numerical Methods and Algorithms参考文献 7被引用数 11
ひとこと要約

この論文では、固定小数点整数としての高精度なスーパ_accumulator(小規模および大規模)をハイブリッドに使用する高速かつ正確な合計計算手法を提案する。この手法により、倍精度浮動小数点数の正確な合計値を最も近い浮動小数点値に正しく丸めることができる。本手法は、現代の64ビットプロセッサ上で、単純な合計計算の2倍未満の時間で実行可能であり、メモリ帯域幅に近い性能を達成する。これにより、再現性を損なわず、直列および並列処理の両方で効率的な正確な合計計算が可能になる。

ABSTRACT

I present two new methods for exactly summing a set of floating-point numbers, and then correctly rounding to the nearest floating-point number. Higher accuracy than simple summation (rounding after each addition) is important in many applications, such as finding the sample mean of data. Exact summation also guarantees identical results with parallel and serial implementations, since the exact sum is independent of order. The new methods use variations on the concept of a "superaccumulator" - a large fixed-point number that can exactly represent the sum of any reasonable number of floating-point values. One method uses a "small" superaccumulator with sixty-seven 64-bit chunks, each with 32-bit overlap with the next chunk, allowing carry propagation to be done infrequently. The small superaccumulator is used alone when summing a small number of terms. For big summations, a "large" superaccumulator is used as well. It consists of 4096 64-bit chunks, one for every possible combination of exponent bits and sign bit, plus counts of when each chunk needs to be transferred to the small superaccumulator. To add a term to the large superaccumulator, only a single chunk and its associated count need to be updated, which takes very few instructions if carefully implemented. On modern 64-bit processors, exactly summing a large array using this combination of large and small superaccumulators takes less than twice the time of simple, inexact, ordered summation, with a serial implementation. A parallel implementation using a small number of processor cores can be expected to perform exact summation of large arrays at a speed that reaches the limit imposed by memory bandwidth. Some common methods that attempt to improve accuracy without being exact may therefore be pointless, at least for large summations, since they are slower than computing the sum exactly.

研究の動機と目的

  • 浮動小数点数の合計を高速かつ正確に行い、最も近い表現可能な値に正しく丸めることを保証する手法を開発すること。
  • 特に大規模な配列に対して性能のボトルネックとなる既存の正確な合計計算手法の課題を克服すること。
  • 直列および並列実装の両方で、順序に依存しない再現可能な結果を得ること。
  • 小規模な問題に対する正確な合計計算の固定計算オーバーヘッドを低減すること。
  • Rにおける正確な標本平均計算などの高精度な統計計算をサポートすること。

提案手法

  • 67個の重複する64ビットチャンクを備えた「小規模」スーパ_accumulatorを使用。各チャンクは32ビットの重複を持つため、まれな桁上げ伝播が可能になる。
  • 4096個のチャンクを持つ「大規模」スーパ_accumulatorを使用。各チャンクは符号と指数ビットのすべての組み合わせに対応し、更新回数を追跡する。
  • 各項に対して、1つのチャンクとその関連するカウントのみを更新することで、命令数を最小限に抑える。
  • 必要に応じてのみ、大規模スーパ_accumulatorの非ゼロチャンクを小規模スーパ_accumulatorに転送し、オーバーヘッドを削減する。
  • 両方のスーパ_accumulatorを組み合わせる:小規模は小規模な合計に、大規模は大規模な合計に使用。並列処理における部分結果の効率的統合を実現する。
  • 整数演算を用いて固定小数点形式で正確な合計値を表現し、蓄積過程での浮動小数点の丸め誤差を回避する。

実験結果

リサーチクエスチョン

  • RQ1現代の64ビットプロセッサ上で、メモリ帯域幅に近い速度で正確な合計計算が可能か?
  • RQ2ハイブリッドスーパ_accumulator設計により、小規模な配列に対する正確な合計計算の固定コストを低減できるか?
  • RQ3指数ごとの追跡機能を備えた大規模スーパ_accumulatorを用いることで、正確な合計計算の並列化が効率的に行えるか?
  • RQ4大規模な問題において、正確な合計計算が、正確性と性能の両面で不正確だが高速な手法を上回れるか?
  • RQ5特に並列環境下では、正確な合計計算の性能が計算ではなくメモリ帯域幅によって制限されているか?

主な発見

  • ハイブリッド小規模および大規模スーパ_accumulator手法により、現代の64ビットプロセッサ上で、単純な不正確な合計計算の2倍未満の時間で正確な合計計算が実現された。
  • 大規模な配列では、この手法がメモリ帯域幅の上限に達しており、処理性能はもはやCPUの制限ではなく、データ移動によって制限されていることが示唆された。
  • 4コアでIntel Xeon E3-1230 v2でピークメモリ帯域幅を活用できたため、大規模データセットでは最適性能を得るのに数コアあれば十分であることが示された。
  • 非常に小さな合計値では、小規模スーパ_accumulator手法は、初期化およびスキャンの固定コストのため、単純な合計計算の10~20倍遅くなった。
  • 大規模スーパ_accumulatorにより、効率的な並列化が可能となった:配列を分割して並列で合計しても、直列処理と同一の結果が得られ、再現性が保証された。
  • 正確な合計計算手法が、正確性と効率性の両方を満たすため、大規模アプリケーションでは非正確で速い手法の使用は不要であることが示された。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。