 Bridging the Gap: Writing Portable Programs for CPU and GPU1/66Bridging the Gap: Writing Portable Programs for CPU and GPU using CUDA Thomas Mejstrik Sebastian Woblistin 2/66Content 1 Motivation Audience etc.. Cuda crash course Quiz time 2 Patterns Oldschool afterwards7/66 Motivation Patterns The dark path Cuda proposal Thank you Why write programs for CPU and GPU Difference CPU/GPU Algorithms are designed differently Latency/Throughput Memory bandwidth Number of talk7/66 Motivation Patterns The dark path Cuda proposal Thank you Why write programs for CPU and GPU Difference CPU/GPU Why it makes sense? Library/Framework developers Embarrassingly parallel algorithms0 码力 | 124 页 | 4.10 MB | 6 月前3 Bridging the Gap: Writing Portable Programs for CPU and GPU1/66Bridging the Gap: Writing Portable Programs for CPU and GPU using CUDA Thomas Mejstrik Sebastian Woblistin 2/66Content 1 Motivation Audience etc.. Cuda crash course Quiz time 2 Patterns Oldschool afterwards7/66 Motivation Patterns The dark path Cuda proposal Thank you Why write programs for CPU and GPU Difference CPU/GPU Algorithms are designed differently Latency/Throughput Memory bandwidth Number of talk7/66 Motivation Patterns The dark path Cuda proposal Thank you Why write programs for CPU and GPU Difference CPU/GPU Why it makes sense? Library/Framework developers Embarrassingly parallel algorithms0 码力 | 124 页 | 4.10 MB | 6 月前3
 C++ Exceptions for Smaller Firmwareheap? 48I would give an answer… They'd accept… 49Let's Make exceptions work on ARM! 50Arm GNU Toolchain GCC 11.3 arm-none-eabi-g++ -o except.elf except.cpp -std=c++20 -Os -g -fexceptions time the code throws) 53💥 Breaking Barrier #1 Enabling Exceptions in ARM GCC 54Step 1: Download & Build "ARM GNU Toolchain download" 55 Step 2. Find and modify -fno-exceptions → -fexceptionsStep you That was to show you that something is here. 94C++ Exceptions from throw to catch on GCC ARM 95Things that will NOT be covered here ● Nested exceptions ● Anything other than table based exceptions0 码力 | 237 页 | 6.74 MB | 6 月前3 C++ Exceptions for Smaller Firmwareheap? 48I would give an answer… They'd accept… 49Let's Make exceptions work on ARM! 50Arm GNU Toolchain GCC 11.3 arm-none-eabi-g++ -o except.elf except.cpp -std=c++20 -Os -g -fexceptions time the code throws) 53💥 Breaking Barrier #1 Enabling Exceptions in ARM GCC 54Step 1: Download & Build "ARM GNU Toolchain download" 55 Step 2. Find and modify -fno-exceptions → -fexceptionsStep you That was to show you that something is here. 94C++ Exceptions from throw to catch on GCC ARM 95Things that will NOT be covered here ● Nested exceptions ● Anything other than table based exceptions0 码力 | 237 页 | 6.74 MB | 6 月前3
 Just-in-Time Compilation - J F Bastien - CppCon 2020interpreter a JiT, or AoT? What if it modifies its bytecode? A CPU executes machine code… an interpreter executes bytecode… That’s the same thing, a CPU is an interpreter for machine code. A compiler can perform factor of 7 to 20. How do you develop hardware that doesn’t exist yet? When I started working on a CPU, it wasn’t obvious to me that you do so with simulators—multiple simulators—which simulate what the to the performance level of -O4.” “ Rosenblum et al. 1995 By far the fastest simulator of the CPU, MMU, and memory system of an SGI multiprocessor is an SGI multiprocessor. In other words, when0 码力 | 111 页 | 3.98 MB | 6 月前3 Just-in-Time Compilation - J F Bastien - CppCon 2020interpreter a JiT, or AoT? What if it modifies its bytecode? A CPU executes machine code… an interpreter executes bytecode… That’s the same thing, a CPU is an interpreter for machine code. A compiler can perform factor of 7 to 20. How do you develop hardware that doesn’t exist yet? When I started working on a CPU, it wasn’t obvious to me that you do so with simulators—multiple simulators—which simulate what the to the performance level of -O4.” “ Rosenblum et al. 1995 By far the fastest simulator of the CPU, MMU, and memory system of an SGI multiprocessor is an SGI multiprocessor. In other words, when0 码力 | 111 页 | 3.98 MB | 6 月前3
 Conan 2.3 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 748 页 | 4.65 MB | 1 年前3 Conan 2.3 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 748 页 | 4.65 MB | 1 年前3
 Conan 2.5 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 769 页 | 4.70 MB | 1 年前3 Conan 2.5 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 769 页 | 4.70 MB | 1 年前3
 Conan 2.4 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 769 页 | 4.69 MB | 1 年前3 Conan 2.4 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 769 页 | 4.69 MB | 1 年前3
 Conan 2.10 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 803 页 | 5.02 MB | 10 月前3 Conan 2.10 Documentationif self.settings.os == "Macos" and self.settings.arch == "armv8": raise ConanInvalidConfiguration("ARM v8 not supported in Macos") Conditional requirements using a conanfile.py You could add some logic cppstd=gnu14 compiler.libcxx=libstdc++11 compiler.version=9 [buildenv] CC=arm-linux-gnueabihf-gcc-9 CXX=arm-linux-gnueabihf-g++-9 LD=arm-linux-gnueabihf-ld Important: Please, take into account that in order case the host machine is a Raspberry Pi 3 with armv7hf architecture operating system and we have the arm-linux-gnueabihf toolchain installed in the Ubuntu machine. If you have a look at the raspberry profile0 码力 | 803 页 | 5.02 MB | 10 月前3
 Conan 1.16 Documentationbuilt. 10.1. Cross-building 121 conan Documentation, Release 1.16.1 Windows to Raspberry Pi (Linux/ARM) • Install the toolchain: http://gnutoolchains.com/raspberry/ You can choose different versions of settings in the profile accordingly. • Create a file named win_to_rpi with the contents: target_host=arm-linux-gnueabihf standalone_toolchain=C:/sysgcc/raspberry cc_compiler=gcc cxx_compiler=g++ [settings] previous examples, except the complexity of managing different architectures (armeabi, armeabi-v7a, x86, arm64-v8a) and the Android API levels. Download the Android NDK here and unzip it. Note: If you are in0 码力 | 545 页 | 4.34 MB | 1 年前3 Conan 1.16 Documentationbuilt. 10.1. Cross-building 121 conan Documentation, Release 1.16.1 Windows to Raspberry Pi (Linux/ARM) • Install the toolchain: http://gnutoolchains.com/raspberry/ You can choose different versions of settings in the profile accordingly. • Create a file named win_to_rpi with the contents: target_host=arm-linux-gnueabihf standalone_toolchain=C:/sysgcc/raspberry cc_compiler=gcc cxx_compiler=g++ [settings] previous examples, except the complexity of managing different architectures (armeabi, armeabi-v7a, x86, arm64-v8a) and the Android API levels. Download the Android NDK here and unzip it. Note: If you are in0 码力 | 545 页 | 4.34 MB | 1 年前3
 Conan 1.14 Documentationbuilt. 10.1. Cross-building 123 conan Documentation, Release 1.14.5 Windows to Raspberry Pi (Linux/ARM) • Install the toolchain: http://gnutoolchains.com/raspberry/ You can choose different versions of settings in the profile accordingly. • Create a file named win_to_rpi with the contents: target_host=arm-linux-gnueabihf standalone_toolchain=C:/sysgcc/raspberry cc_compiler=gcc cxx_compiler=g++ [settings] previous examples, except the complexity of managing different architectures (armeabi, armeabi-v7a, x86, arm64-v8a) and the Android API levels. Download the Android NDK here and unzip it. Note: If you are in0 码力 | 528 页 | 4.17 MB | 1 年前3 Conan 1.14 Documentationbuilt. 10.1. Cross-building 123 conan Documentation, Release 1.14.5 Windows to Raspberry Pi (Linux/ARM) • Install the toolchain: http://gnutoolchains.com/raspberry/ You can choose different versions of settings in the profile accordingly. • Create a file named win_to_rpi with the contents: target_host=arm-linux-gnueabihf standalone_toolchain=C:/sysgcc/raspberry cc_compiler=gcc cxx_compiler=g++ [settings] previous examples, except the complexity of managing different architectures (armeabi, armeabi-v7a, x86, arm64-v8a) and the Android API levels. Download the Android NDK here and unzip it. Note: If you are in0 码力 | 528 页 | 4.17 MB | 1 年前3
 Conan 1.15 Documentationbuilt. 10.1. Cross-building 123 conan Documentation, Release 1.15.1 Windows to Raspberry Pi (Linux/ARM) • Install the toolchain: http://gnutoolchains.com/raspberry/ You can choose different versions of settings in the profile accordingly. • Create a file named win_to_rpi with the contents: target_host=arm-linux-gnueabihf standalone_toolchain=C:/sysgcc/raspberry cc_compiler=gcc cxx_compiler=g++ [settings] previous examples, except the complexity of managing different architectures (armeabi, armeabi-v7a, x86, arm64-v8a) and the Android API levels. Download the Android NDK here and unzip it. Note: If you are in0 码力 | 540 页 | 4.22 MB | 1 年前3 Conan 1.15 Documentationbuilt. 10.1. Cross-building 123 conan Documentation, Release 1.15.1 Windows to Raspberry Pi (Linux/ARM) • Install the toolchain: http://gnutoolchains.com/raspberry/ You can choose different versions of settings in the profile accordingly. • Create a file named win_to_rpi with the contents: target_host=arm-linux-gnueabihf standalone_toolchain=C:/sysgcc/raspberry cc_compiler=gcc cxx_compiler=g++ [settings] previous examples, except the complexity of managing different architectures (armeabi, armeabi-v7a, x86, arm64-v8a) and the Android API levels. Download the Android NDK here and unzip it. Note: If you are in0 码力 | 540 页 | 4.22 MB | 1 年前3
共 181 条
- 1
- 2
- 3
- 4
- 5
- 6
- 19














