Usable assembly language for GPUs : a success story

D.J. Bernstein, H.-C. Chen, C.M. Cheng, T. Lange, R.F. Niederhagen, P. Schwabe, B.Y. Yang

Research output: Book/ReportReportAcademic

Abstract

The NVIDIA compilers nvcc and ptxas leave the programmer with only very limited control over register allocation, register spills, instruction selection, and instruction scheduling. In theory a programmer can gain control by writing an entire kernel in van der Laan's cudasm assembly language, but this requires tedious, error-prone tracking of register assignments. This paper introduces a higher-level assembly language, qhasm-cudasm, that allows much faster programming while providing the same amount of control over the GPU. This language has been used successfully to build a 90000-machine-instruction kernel for a computation described in detail in the paper, the largest public cryptanalytic project in history. The best GTX 295 speed that has been obtained for this computation with nvcc and ptxas is 25 million iterations per second; the best GTX 295 speed that has been obtained with qhasm-cudasm is 63 million iterations per second.
Original languageEnglish
PublisherIACR
Number of pages10
Publication statusPublished - 2012

Publication series

NameCryptology ePrint Archive
Volume2012/137

Fingerprint

Gain control
Hazardous materials spills
Scheduling
Graphics processing unit

Cite this

Bernstein, D. J., Chen, H-C., Cheng, C. M., Lange, T., Niederhagen, R. F., Schwabe, P., & Yang, B. Y. (2012). Usable assembly language for GPUs : a success story. (Cryptology ePrint Archive; Vol. 2012/137). IACR.
Bernstein, D.J. ; Chen, H.-C. ; Cheng, C.M. ; Lange, T. ; Niederhagen, R.F. ; Schwabe, P. ; Yang, B.Y. / Usable assembly language for GPUs : a success story. IACR, 2012. 10 p. (Cryptology ePrint Archive).
@book{49a3afe79d294a428e03f186ad531f4f,
title = "Usable assembly language for GPUs : a success story",
abstract = "The NVIDIA compilers nvcc and ptxas leave the programmer with only very limited control over register allocation, register spills, instruction selection, and instruction scheduling. In theory a programmer can gain control by writing an entire kernel in van der Laan's cudasm assembly language, but this requires tedious, error-prone tracking of register assignments. This paper introduces a higher-level assembly language, qhasm-cudasm, that allows much faster programming while providing the same amount of control over the GPU. This language has been used successfully to build a 90000-machine-instruction kernel for a computation described in detail in the paper, the largest public cryptanalytic project in history. The best GTX 295 speed that has been obtained for this computation with nvcc and ptxas is 25 million iterations per second; the best GTX 295 speed that has been obtained with qhasm-cudasm is 63 million iterations per second.",
author = "D.J. Bernstein and H.-C. Chen and C.M. Cheng and T. Lange and R.F. Niederhagen and P. Schwabe and B.Y. Yang",
year = "2012",
language = "English",
series = "Cryptology ePrint Archive",
publisher = "IACR",

}

Bernstein, DJ, Chen, H-C, Cheng, CM, Lange, T, Niederhagen, RF, Schwabe, P & Yang, BY 2012, Usable assembly language for GPUs : a success story. Cryptology ePrint Archive, vol. 2012/137, IACR.

Usable assembly language for GPUs : a success story. / Bernstein, D.J.; Chen, H.-C.; Cheng, C.M.; Lange, T.; Niederhagen, R.F.; Schwabe, P.; Yang, B.Y.

IACR, 2012. 10 p. (Cryptology ePrint Archive; Vol. 2012/137).

Research output: Book/ReportReportAcademic

TY - BOOK

T1 - Usable assembly language for GPUs : a success story

AU - Bernstein, D.J.

AU - Chen, H.-C.

AU - Cheng, C.M.

AU - Lange, T.

AU - Niederhagen, R.F.

AU - Schwabe, P.

AU - Yang, B.Y.

PY - 2012

Y1 - 2012

N2 - The NVIDIA compilers nvcc and ptxas leave the programmer with only very limited control over register allocation, register spills, instruction selection, and instruction scheduling. In theory a programmer can gain control by writing an entire kernel in van der Laan's cudasm assembly language, but this requires tedious, error-prone tracking of register assignments. This paper introduces a higher-level assembly language, qhasm-cudasm, that allows much faster programming while providing the same amount of control over the GPU. This language has been used successfully to build a 90000-machine-instruction kernel for a computation described in detail in the paper, the largest public cryptanalytic project in history. The best GTX 295 speed that has been obtained for this computation with nvcc and ptxas is 25 million iterations per second; the best GTX 295 speed that has been obtained with qhasm-cudasm is 63 million iterations per second.

AB - The NVIDIA compilers nvcc and ptxas leave the programmer with only very limited control over register allocation, register spills, instruction selection, and instruction scheduling. In theory a programmer can gain control by writing an entire kernel in van der Laan's cudasm assembly language, but this requires tedious, error-prone tracking of register assignments. This paper introduces a higher-level assembly language, qhasm-cudasm, that allows much faster programming while providing the same amount of control over the GPU. This language has been used successfully to build a 90000-machine-instruction kernel for a computation described in detail in the paper, the largest public cryptanalytic project in history. The best GTX 295 speed that has been obtained for this computation with nvcc and ptxas is 25 million iterations per second; the best GTX 295 speed that has been obtained with qhasm-cudasm is 63 million iterations per second.

M3 - Report

T3 - Cryptology ePrint Archive

BT - Usable assembly language for GPUs : a success story

PB - IACR

ER -

Bernstein DJ, Chen H-C, Cheng CM, Lange T, Niederhagen RF, Schwabe P et al. Usable assembly language for GPUs : a success story. IACR, 2012. 10 p. (Cryptology ePrint Archive).