没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
GPU Coder™
Getting Started Guide
R2024a
How to Contact MathWorks
Latest news:
www.mathworks.com
Sales and services:
www.mathworks.com/sales_and_services
User community:
www.mathworks.com/matlabcentral
Technical support:
www.mathworks.com/support/contact_us
Phone: 508-647-7000
The MathWorks, Inc.
1 Apple Hill Drive
Natick, MA 01760-2098
GPU Coder™ Getting Started Guide
© COPYRIGHT 2017–2024 by The MathWorks, Inc.
The software described in this document is furnished under a license agreement. The software may be used or copied
only under the terms of the license agreement. No part of this manual may be photocopied or reproduced in any form
without prior written consent from The MathWorks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation by, for, or through
the federal government of the United States. By accepting delivery of the Program or Documentation, the government
hereby agrees that this software or documentation qualies as commercial computer software or commercial computer
software documentation as such terms are used or dened in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014.
Accordingly, the terms and conditions of this Agreement and only those rights specied in this Agreement, shall pertain
to and govern the use, modication, reproduction, release, performance, display, and disclosure of the Program and
Documentation by the federal government (or other entity acquiring for or through the federal government) and shall
supersede any conicting contractual terms or conditions. If this License fails to meet the government's needs or is
inconsistent in any respect with federal procurement law, the government agrees to return the Program and
Documentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand names may be
trademarks or registered trademarks of their respective holders.
Patents
MathWorks products are protected by one or more U.S. patents. Please see www.mathworks.com/patents for
more information.
Revision History
September 2017 Online only New for Version 1.0 (Release 2017b)
March 2018 Online only Revised for Version 1.1 (Release 2018a)
September 2018 Online only Revised for Version 1.2 (Release 2018b)
March 2019 Online only Revised for Version 1.3 (Release 2019a)
September 2019 Online only Revised for Version 1.4 (Release 2019b)
March 2020 Online only Revised for Version 1.5 (Release 2020a)
September 2020 Online only Revised for Version 2.0 (Release 2020b)
March 2021 Online only Revised for Version 2.1 (Release 2021a)
September 2021 Online only Revised for Version 2.2 (Release 2021b)
March 2022 Online only Revised for Version 2.3 (Release 2022a)
September 2022 Online only Revised for Version 2.4 (Release 2022b)
March 2023 Online only Revised for Version 2.5 (Release 2023a)
September 2023 Online only Revised for Version 23.2 (R2023b)
March 2024 Online only Revised for Version 24.1 (R2024a)
About GPU Coder
1
GPU Coder Product Description .................................. 1-2
Installing Prerequisite Products ................................. 1-3
MathWorks Products and Support Packages ....................... 1-3
Third-Party Hardware ........................................ 1-3
Third-Party Software ........................................ 1-4
Tips ..................................................... 1-5
Setting Up the Prerequisite Products ............................. 1-7
MEX Setup ................................................ 1-7
Environment Variables ....................................... 1-7
Verify Setup .............................................. 1-10
The GPU Environment Check and Setup App ...................... 1-12
Hardware Setup ........................................... 1-13
Board Settings ............................................ 1-15
Workow Checks .......................................... 1-15
Environment Checks ........................................ 1-17
GPU Code Generation Environment Check Report ................. 1-17
Tutorials
2
Code Generation by Using the GPU Coder App ...................... 2-2
Learning Objectives ......................................... 2-2
Tutorial Prerequisites ........................................ 2-2
Example: The Mandelbrot Set .................................. 2-2
Tutorial Files .............................................. 2-3
Run the Original MATLAB Code ................................ 2-4
Prepare MATLAB Code for Code Generation ....................... 2-5
Make the MATLAB Code Suitable for Code Generation ............... 2-6
Generate Code by Using the GPU Coder App ...................... 2-7
Code Generation Using the Command Line Interface ............... 2-15
Learning Objectives ........................................ 2-15
Tutorial Prerequisites ....................................... 2-15
Example: The Mandelbrot Set ................................. 2-15
Tutorial Files ............................................. 2-16
Run the Original MATLAB Code ............................... 2-17
Make the MATLAB Code Suitable for Code Generation .............. 2-18
Code Generation from the Command Line ........................ 2-19
iii
Contents
Verify Correctness of the Generated Code ........................ 2-22
GPU Code Generation: The Mandelbrot Set ....................... 2-23
Debug CUDA MEX Functions ................................... 2-28
Debug CUDA MEX Functions by Using a Debugger ................ 2-28
Debug on Microsoft Windows Platforms ......................... 2-28
Debug on Linux Platforms .................................... 2-29
Congure CMake Build Process ................................. 2-31
Specify CMake Toolchain Denition ............................ 2-31
Available CMake Toolchain Denitions .......................... 2-32
Verication
3
Verify Correctness of the Generated Code .......................... 3-2
Verify MEX Functions in the GPU Coder App ...................... 3-2
Verify MEX Functions at the Command Line ....................... 3-2
Code Verication Through Software-In-The-Loop ................... 3-3
Numerical Dierences Between CPU and GPU ..................... 3-4
About GPU Code Generation
4
GPU Programming Paradigm .................................... 4-2
GPU Code Generation Workow .................................. 4-3
iv Contents
剩余67页未读,继续阅读
资源评论
veir_213
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功