14
FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIR K CH:11 Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form

FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

Embed Size (px)

Citation preview

Page 1: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.1Mapping between OpenCL and CUDA data parallelism model concepts.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 2: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.2Overview of the OpenCL parallel execution model.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 3: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.3Mapping of OpenCL dimensions and indices to CUDA dimensions and indices.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 4: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.4Conceptual OpenCL device architecture; the host is not shown.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 5: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.5Mapping of OpenCL memory types to CUDA memory types.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 6: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.6A simple OpenCL kernel example.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 7: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.7OpenCL context required to manage devices.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 8: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.8Creating an OpenCL context and command queue.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 9: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.9DCS Kernel Version 3 NDRange configuration.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 10: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.10Mapping DCS NDRange to OpenCL device.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 11: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.11Data access indexing in OpenCL and CUDA.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 12: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.12Inner loop of the OpenCL DCS kernel.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 13: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.13Building an OpenCL kernel.

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”

Page 14: FIGURE 11.1 Mapping between OpenCL and CUDA data parallelism model concepts. KIRK CH:11 “Programming Massively Parallel Processors: A Hands-on Approach

FIGURE 11.14OpenCL host code for kernel launch and .

KIRK

CH:11

“Programming Massively Parallel Processors: A Hands-on Approach. DOI: 10.1016/B978-0-12-381472-2.00009-X © 2010 David B. Kirk/NVIDIA Corporation and Wen-mei Hwu. Published by Elsevier Inc. All rights of reproduction in any form reserved.”