Accelerating MATLAB with GPUs A Primer with Examples - MG(1).pdf
(
32441 KB
)
Pobierz
Accelerating MATLAB with GPU Computing
Accelerating MATLAB with
GPU Computing
A Primer with Examples
Jung W. Suh
Youngmin Kim
AMSTERDAM
BOSTON
HEIDELBERG
LONDON
NEW YORK
OXFORD
PARIS
SAN DIEGO
SAN FRANCISCO
SINGAPORE
SYDNEY
TOKYO
Morgan Kaufmann is an imprint of Elsevier
Acquiring Editor: Todd Green
Editorial Project Manager: Lindsay Lawrence
Project Manager: Mohana Natarajan
Designer: Matthew Limbert
Morgan Kaufmann is an imprint of Elsevier
225 Wyman Street, Waltham, MA 02451, USA
First edition 2014
Copyright
©
2014 Elsevier Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system or transmitted
in any form or by any means electronic, mechanical, photocopying, recording or otherwise
without the prior written permission of the publisher.
Permissions may be sought directly from Elsevier’s Science & Technology Rights
Department in Oxford, UK: phone (
1
44) (0) 1865 843830; fax (
1
44) (0) 1865 853333;
email:
permissions@elsevier.com
.
Alternatively you can submit your request online by
visiting the Elsevier web site at
http://elsevier.com/locate/permissions
,
and selecting
Obtaining permission to use Elsevier material.
Notice
No responsibility is assumed by the publisher for any injury and/or damage to persons or
property as a matter of products liability, negligence or otherwise, or from any use or
operation of any methods, products, instructions or ideas contained in the materialherein.
Because of rapid advances in the medical sciences, in particular, independentverification
of diagnoses and drug dosages should be made.
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library
Library of Congress Cataloging-in-Publication Data
Application Submitted
ISBN: 978-0-12-408080-5
For information on all MK publications
visit our web site at
www.mkp.com
Printed and bound in USA
1415161718 10987654321
Preface
MATLAB is a widely used simulation tool for rapid prototyping and algorithm
development. Many laboratories and research institutions face growing demands to
run their MATLAB codes faster for computationally heavy projects after simple
simulations. Since MATLAB uses a vector/matrix representation of data, which is
suitable for parallel processing, it can benefit a lot from GPU acceleration.
Target Readers and Contents
This book is aimed primarily at the graduate students and researchers in the field of
engineering, science, and technology who need huge data processing without losing
the many benefits of MATLAB. However, MATLAB users come from various back-
grounds and do not necessarily have much programming experience. For those whose
backgrounds are not from programming, GPU acceleration for MATLAB may distract
their algorithm development and introduce unnecessary hassles, even when setting the
environment. This book targets the readers who have some or a lot of experience on
MATLAB coding but not enough depth in either C coding or the computer architec-
ture for parallelization. So readers can focus more on their research and work by
avoiding non-algorithmic hassles in using GPU and CUDA in MATLAB.
As a primer, the book will start with the basics, walking through the process of
setting MATLAB for CUDA (in Windows and Mac OSX), creating
c-mex
and
m
-file
profiling, then guide the users through the expert-level topics such as third-party
CUDA libraries. It also provides many practical ways to modify users’ MATLAB
codes to better utilize the immense computational power of graphics processors.
This book guides the reader to dramatically maximize the MATLAB speed
using NVIDIA’s Graphics Processing Unit (GPU). NVIDIA’s Compute Unified
Device Architecture (CUDA) is a parallel computing architecture originally
designed for computer games but is getting a reputation in the general science and
technology fields for its efficient massive computation power. From this book, the
reader can take advantage of the parallel processing power of GPU and abundant
CUDA scientific libraries for accelerating MATLAB code with no or less effort
and time, and bring readers’ researches and works to a higher level.
Directions of this Book
GPU Utilization Using c-mex Versus Parallel Computing Toolbox
This book deals with Mathworks’s Parallel Computing Toolbox in Chapter 5.
Although Mathworks’s Parallel Computing Toolbox is a useful tool for speeding
x
Preface
up MATLAB, the current version still has its limitation in making the Parallel
Computing Toolbox a general speeding-up solution, in addition to the extra cost of
purchasing the toolbox. Especially, since the Parallel Computing Toolbox targets
distributed computing over multicore, multiple computers and/or cluster machines
as well as GPU processing, GPU optimization for speeding up the user’s code is
comparatively limited both in speeding-up and supporting MATLAB functions.
Furthermore, if we limit to Mathworks’s the Parallel Computing Toolbox only,
then it is difficult to find an efficient way to utilize the abundant CUDA libraries to
their maximum. In this book, we address both the strengths and the limitations of
the current Parallel Computing Toolbox in Chapter 5. For the purpose of general
speeding up, GPU-utilization through
c-mex
proves a better approach and provides
more flexibility in current situation.
Tutorial Approach Versus Case Study Approach
As the book’s title says, we take more of a tutorial approach. MATLAB users may
come from many different backgrounds, and web resources are scattered over
Mathworks, NVIDIA, and private blogs as fragmented information. The tutorial
approach from setting the GPU environment to acquiring critical (but compressed)
hardware knowledge for GPU would be beneficial to prospective readers over a
wide spectrum. However, this book also has two chapters (Chapters 7 and 8) that
include case examples with working codes.
CUDA Versus OpenCL
When we prepared the proposal of this book, we also considered OpenCL as a
topic, because the inclusion of OpenCL would attract a wider range of readers.
However, while CUDA is more consistent and stable, because it is solely driven by
NVIDIA, the current OpenCL has no unified development environment and is still
unstable in some areas, because OpenCL is not governed by one company or insti-
tution. For this reason, installing, profiling, and debugging OpenCL are not yet
standardized. As a primer, this may distract the focus of this book. More impor-
tantly, for some reason Mathworks is very conservative in its support of OpenCL,
unlike CUDA. Therefore, we decided not to include OpenCL in this edition of our
book. However, we will again consider whether to include OpenCL in future edi-
tions if increased needs come from market or Mathworks’ direction changes.
After reading this book, the reader, in no time, will experience an amazing per-
formance boost in utilizing reader’s MATLAB codes and be better equipped in
research to enjoy the useful open-source resources for CUDA. The features this
book covers are available on Windows and Mac.
Plik z chomika:
AnOnYmOuSFORCE
Inne pliki z tego folderu:
IVT BlueSoleil 10.0.496.1 RegKey.zip
(154196 KB)
Logo Design Studio v3.5.rar
(12509 KB)
Designsoft Tina Industrial V8.0.rar
(122180 KB)
Optitex 10 Fashion Design.rar
(438309 KB)
RonyaSoft Poster Designer 2.01.20 + Keygen (pelna wersja + instrukcja).rar
(11803 KB)
Inne foldery tego chomika:
- ▧ ▍PROGRAMY PC ( PORTABLE ) 2014
- ▧ ▍- FILMY - KOL. DISCOVERY 2014
- ▧ ▍- FILMY - AKCJA - THRILLER 2014
- ▧ ▍- FILMY - BIBLIJNE 2014
- ▧ ▍- FILMY - BIOGRAFICZNE 2014
Zgłoś jeśli
naruszono regulamin