Abstract
Recently, C-based OpenCL design environment is proposed to design FPGA (field programmable gate array) accelerators. Although many c-programs can be executed on FPGAs, the best c-code for a CPU may not be the most appropriate one for an FPGA. Users must have some knowledge about computer architecture in order to write a good OpenCL code. In addition, OpenCL-based design process requires several hours of compilation time, because re-writing and compiling many different OpenCL codes may require a very large design time. To solve this problem, we propose an automatic optimization method. We accurately predict the kernel performance using the log files generated at the initial stage of the compilation. Then we find the optimized FPGA architecture by searching all possible design parameters. We implement the proposed method to find the optimized architecture for stencil computation. According to the results, the design time has been reduced to 6–11% of the conventional approach.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Czajkowski, T.S., Neto, D., Kinsner, M., Aydonat, U., Wong, J., Denisenko, D., Yiannacouras, P., Freeman, J., Singh, D.P., Brown, S.D.: OpenCL for FPGAs: Prototyping a Compiler, International Conference on Engineering of Reconfigurable Systems and Algorithms (ERSA), pp. 3–12 (2012)
Dohi, K., Okina, K., Soejima, R., Shibata, Y., Oguri, K.: Performance modeling of stencil computing on a stream-based FPGA accelerator for efficient design space exploration. IEICE Trans. Inf. Syst. E98-D(2), 298–308 (2015)
Khronos Group: The open standard for parallel programming of heterogeneous systems. https://www.khronos.org/opencl/
Intel: SDK for OpenCL. https://www.altera.com/products/design-software/embedded-software-developers/opencl/overview.html
Jia, Q., Zhou, H.: Tuning stencil codes in OpenCL for FPGAs. In: IEEE 34th International Conference on Computer Design (ICCD), pp. 249–256 (2016)
Krommydas, K., Sasanka, R., Feng, W.: GLAF: a visual programming and auto-tuning framework for parallel computing. In: IEEE 44th International Conference on Parallel Processing (ICPP), pp. 859–868 (2015)
Krommydas, K., Sasanka, R., Feng, W.: Bridging the FPGA programmability-portability Gap via automatic OpenCL code generation and tuning. In: IEEE 27th International Conference on Application-Specific Systems, Architectures and Processors (ASAP), pp. 213–218 (2016)
Karniadakis, G., Sherwin, S.: Spectral/hp Element Methods for Computational Fluid Dynamics. Oxford University Press (2013)
Roth, G., Mellor-Crummey, J., Kennedy, K., Brickner, R.G.: Compiling stencils in high performance fortran. In: Proceedings of the 1997 ACM/IEEE Conference on Supercomputing, pp. 1–20 (1997)
Sano, K., Hatsuda, Y., Yamamoto, S.: Multi-FPGA accelerator for scalable stencil computation with constant memory bandwidth. IEEE Trans. Parallel Distrib. Syst. 25(3), 695–705 (2014)
Waidyasooriya, H.M., Hariyama, M.: Hardware-Acceleration of short-read alignment based on the burrows-wheeler transform. IEEE Trans. Parallel Distrib. Syst. 27(5), 1358–1372 (2016)
Waidyasooriya, H.M., Takei, Y., Tatsumi, S., Hariyama, M.: OpenCL-Based FPGA-Platform for stencil computation and its optimization methodology. IEEE Trans. Parallel Distrib. Syst. 28(5), 1390–1402 (2017)
Yee, K.S.: Numerical solution of initial boundary value problems involving Maxwells equations in isotropic media. IEEE Trans. Antennas Propag. 14(3), 302–307 (1966)
Author information
Authors and Affiliations
Corresponding authors
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this chapter
Cite this chapter
Endo, T., Waidyasooriya, H.M., Hariyama, M. (2018). Automatic Optimization of OpenCL-Based Stencil Codes for FPGAs. In: Lee, R. (eds) Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing. SNPD 2017. Studies in Computational Intelligence, vol 721. Springer, Cham. https://doi.org/10.1007/978-3-319-62048-0_6
Download citation
DOI: https://doi.org/10.1007/978-3-319-62048-0_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-62047-3
Online ISBN: 978-3-319-62048-0
eBook Packages: EngineeringEngineering (R0)