
Explore the differences between cpu and gpu architectures, learn how multiple cores enable parallelism, and determine when to run tasks on cpu versus gpu to optimize Matlab applications.
Explain how physical cores map to logical processors and how hyper-threading enables multiple threads per core, with operating systems reporting more logical processors than physical cores.
Explore MATLAB parallel computing with multithreading, showing eigenvalues and matrix multiplication on multiple cores while some operations use a single core, and learn to time code with tic/toc.
Explore the multi worker concept in MATLAB, compare parfor parallelism with serial for loops, and analyze execution time and overhead to gauge speedup.
Control the number of physical cores that execute your MATLAB code and see how the number of workers and iterations (n) affect execution time and CPU utilization in parfor.
Identify four common parfor pitfalls in MATLAB: avoid decimal increments; prevent indexing that depends on previous values; do not nest parfor loops; and never use break or continue inside parfor.
Learn how to handle nested parfor loops in MATLAB; you cannot nest parfor loops, and parallelize the outer loop to minimize overhead, as nested parfor rarely improves performance.
Explore how an outer loop minimizes data transferred from MATLAB to each core in a multi-worker setup, and compare serial inner loops with parallel execution across 24 workers.
Discover how to use functions within parfor loops in MATLAB, including handling function references, function handles, and inner functions with eval, and learn to diagnose common errors.
Explore how loop variables behave in parfor, highlight reduction variables and independence mistakes, and distinguish temporary from reduction variables using a step-by-step example summing values from 1 to 10.
Explore how to display values inside a parfor loop in MATLAB, addressing workspace communication, variable scope, and the use of local variables to safely display updated array values during iterations.
Explores single program multiple data (spmd) for running a function on different data sets across multiple workers. Highlights advantages over for loops and how per-worker variables are read for results.
Learn to run MATLAB functions in the background with parfeval and parfeval on all, manage outputs as objects, and control workers for parallel execution.
Explore running functions in the background with the Percival function and batch function in MATLAB, including scripts and MATLAB files, and learn to fetch results using load after completion.
Identify your Nvidia GPU architecture and install a graphics driver to enable MATLAB parallel computing with GPUs, then ensure your MATLAB release and the parallel computing toolbox support the device.
Learn to read GPU information in MATLAB with three functions: count GPUs, display a device table, and show all device details such as compute capability.
Prepare data in GPU memory, execute MATLAB functions on the GPU using GPU array, and compare eigenvalues and performance with CPU execution.
Identify how to run functions on GPUs by placing inputs in GPU memory and using GPU arrays, so functions execute on the GPU or CPU depending on data location.
Learn to run MATLAB code on multiple GPUs by setting the GPU count in parallel preferences and choosing the number of workers; explore the for iteration and BMD methods.
Explore data preparation, network creation and configuration, and training workflows in MATLAB, then compare CPU, multi-core, and GPU training using CUDA and the parallel computing toolbox.
Learn to train neural networks on multiple GPUs in MATLAB by configuring parallel workers, selecting GPU versus CPU execution, and comparing resource use and training speed.
Learn how to train deep learning models in MATLAB using CPUs, GPUs, and parallel pools, including selecting execution environments (auto, cpu, gpu, multi GPUs) and cloud options.
learn to train deep neural networks in the background in parallel with MATLAB, using a background function to run on GPU and CPU without blocking.
This course helps students, researchers, and anyone using the MATLAB decrease the execution time they take to execute a program
All computers today and the laptops have multi-cores and GPUs. But not all users use the to run or execute the programs in parallel.
The purpose of the course is to fill this gap. Is to teach you with practical examples how to use all resources on your computer and also how to monitor them.
The course is divided into many sections:
The first is an introduction to the hardware of the CPUs, cores, and GPUs. It is better to understand the basic components of these items to be able to get the best utilization when you use them.
The second section is explaining two concepts. The multi-threading and the multi-workers. The first is a built-in mechanism to run some functions in parallel using many cores but we can't control the number of cores and the way that the functions execute. The second one (multi-workers) is used to run any function on multiple cores but here we can control the number of cores to optimize the program execution. Also, I explained some examples and measured the performance parameters to differentiate between the two concepts.
The third section is the GPU section. In the section, I explained how to run any function on the GPUs to make use of the hundred or thousands of cores that the GPUs have. There are some notations to get the best results and I explained all of these notations with examples.
Deep learning and neural networks: in this section, you will learn how to train any neural network in parallel on GPUs or multi-cores. And also how to run the training process in the background in order to be able to use MATLAB while it is running.