Main Content

MATLAB 코드에서 커널 생성

CUDA® GPU 커널을 생성하는 MATLAB 코드 구조와 패턴

GPU Coder™는 MATLAB® 코드의 특정 알고리즘 구조와 패턴에 최적화된 CUDA 커널을 생성하고 실행합니다. 생성 코드는 cuFFT, cuSolver, cuBLAS, cuDNN, TensorRT를 포함하여 최적화된 NVIDIA® CUDA 라이브러리를 호출합니다. 생성 코드는 소스 코드, 정적 라이브러리 또는 동적 라이브러리로서 프로젝트에 통합할 수 있으며 데스크탑, 서버 및 NVIDIA Jetson, DRIVE를 비롯한 여러 플랫폼에 내장된 GPU에서 사용하도록 컴파일할 수 있습니다. GPU Coder를 사용하면 직접 작성한 CUDA 코드를 알고리즘과 생성 코드에 통합할 수 있습니다.

모두 확장

GPU CoderMATLAB 코드에서 GPU 코드 생성
GPU 환경 검사GPU 코드 생성 환경에 대한 확인과 설정

함수

모두 확장

codegenGenerate C/C++ code from MATLAB code
gpucoderGPU Coder 앱 열기
coder.checkGpuInstallGPU 코드 생성 환경 확인
coder.gpuConfigConfiguration parameters for CUDA code generation from MATLAB code by using GPU Coder
coder.gpu.kernelPragma that maps for-loops to GPU kernels
coder.gpu.kernelfun함수를 GPU 커널에 매핑하는 프라그마
coder.gpu.nokernelPragma to disable kernel creation for loops
coder.cevalCall C/C++ function from generated code
coder.gpu.iterationsPragma that provides information to the code generator for making parallelization decisions on variable bound loops
coder.gpu.constantMemoryPragma that maps a variable to the constant memory on GPU
coder.gpu.persistentMemoryPragma to allocate a variable as persistent memory on the GPU (R2020b 이후)
cudaMemoryManagerQuery memory usage by shared GPU memory manager for MEX functions (R2024a 이후)
gpucoder.atomicAddAtomically add a specified value to a variable in global or shared memory (R2021b 이후)
gpucoder.atomicAndAtomically perform bit-wise AND between a specified value and a variable in global or shared memory (R2021b 이후)
gpucoder.atomicCASAtomically compare and swap the value of a variable in global or shared memory (R2021b 이후)
gpucoder.atomicDecAtomically decrement a variable in global or shared memory within a specified upper bound (R2021b 이후)
gpucoder.atomicExchAtomically exchange a variable in global or shared memory with the specified value (R2021b 이후)
gpucoder.atomicIncAtomically increment a variable in global or shared memory within a specified upper bound (R2021b 이후)
gpucoder.atomicMaxAtomically find the maximum between a specified value and a variable in global or shared memory (R2021b 이후)
gpucoder.atomicMinAtomically find the minimum between a specified value and a variable in global or shared memory (R2021b 이후)
gpucoder.atomicOrAtomically perform bit-wise OR between a specified value and a variable in global or shared memory (R2021b 이후)
gpucoder.atomicSubAtomically subtract a specified value from a variable in global or shared memory (R2021b 이후)
gpucoder.atomicXorAtomically perform bit-wise XOR between a specified value and a variable in global or shared memory (R2021b 이후)
halfConstruct half-precision numeric object
stencilfunGenerate CUDA code for stencil functions (R2022b 이후)
gpucoder.matrixMatrixKernelOptimized GPU implementation of functions containing matrix-matrix operations
gpucoder.batchedMatrixMultiplyOptimized GPU implementation of batched matrix multiply operation (R2020a 이후)
gpucoder.stridedMatrixMultiplyOptimized GPU implementation of strided and batched matrix multiply operation (R2020a 이후)
gpucoder.batchedMatrixMultiplyAddOptimized GPU implementation of batched matrix multiply with add operation (R2020a 이후)
gpucoder.stridedMatrixMultiplyAddOptimized GPU implementation of strided, batched matrix multiply with add operation (R2020a 이후)
gpucoder.sortOptimized GPU implementation of the MATLAB sort function
gpucoder.ctransposeOptimized GPU implementation of the MATLAB transpose function
gpucoder.transposeOptimized GPU implementation of the MATLAB transpose function
gpucoder.reduceOptimized GPU implementation for reduction operations (R2019b 이후)

객체

모두 확장

coder.gpuConfigConfiguration parameters for CUDA code generation from MATLAB code by using GPU Coder
coder.CodeConfigConfiguration parameters for C/C++ code generation from MATLAB code
coder.EmbeddedCodeConfigConfiguration parameters for C/C++ code generation from MATLAB code with Embedded Coder
coder.gpuEnvConfigCreate configuration object containing the parameters passed to coder.checkGpuInstall for performing GPU code generation environment checks

도움말 항목