Diferență între revizuiri ale paginii „PC Lab 6”

De la WikiLabs
Jump to navigationJump to search
 
(Nu s-au afișat 14 versiuni intermediare efectuate de același utilizator)
Linia 9: Linia 9:
  
 
  [ 1, 2 ]  
 
  [ 1, 2 ]  
 
 
  [ 3, 4 ]
 
  [ 3, 4 ]
  
 
the result of normalization is :
 
the result of normalization is :
  
 +
[ 0.3162    0.4472 ]
 +
[ 0.9487    0.8944 ]
  
 +
* That is: 0.3162 * 0.3162 + 0.9487 * 0.9487 = 1 and of course, 0.3162 / 0.9487 is kept as 1 / 3 ratio
 +
* That is: 0.4472 * 0.4472 + 0.8944 * 0.8944 = 1 and of course, 0.4472 / 0.8944 is kept as 2 / 4 ratio
  
 
# Install opencl drivers for your platform
 
# Install opencl drivers for your platform
# Check opencl capable devices with command clinfo
+
# Check what opencl-capable devices with command '''clinfo'''
# Run the VectorAddOpenCL app [[VectorAddOpenCL.cpp]]
+
# Run the VectorAddOpenCL app [[http://wiki.dcae.pub.ro/images/4/4a/VectorAddOpenCL.cpp]] to see that all works ok.
 +
# Implement the normalization operation on a CPU, for reference purposes.
 +
# Implement the normalization operation across 1 OpenCL thread of a single device. Check the result against CPU.
 +
# Implement the normalization operation across multiple OpenCL threads of the same device. Check the result against CPU.
 +
# How much faster is the OpenCL op performed on all threads vs. 1 thread on the same Open CL device ?
 +
# Send e-mail to the teacher, with subject PAO_Lab_6, x86 CPU configuration (eg. i7-2670QM 4C/8T @ 2.2 GHz) and GPU configuration (nVidia GT 540M / 96 CudaCores @ 1344 MHz)
 +
 
 +
'''Note''' In order to use the ACS GPGPU Cluster see [[Using ACS Cluster]]
 +
 
 +
Please read chapters 1,2, 4,5 (skip Ch3 which is very particular to CUDA)
 +
['''GP-GPU Programming guide''' [https://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_C_Programming_Guide.pdf]]
  
  

Versiunea curentă din 26 aprilie 2018 17:43

Session 6

Task: run matrix-column normalization using OpenCL (https://www.khronos.org/opencl)

Matrix-column normalization means that, at the end of the process, every sum of squared elements on the same column is 1.

Example: Assuming matrix is

[ 1, 2 ] 
[ 3, 4 ]

the result of normalization is :

[ 0.3162     0.4472 ]
[ 0.9487     0.8944 ]
  • That is: 0.3162 * 0.3162 + 0.9487 * 0.9487 = 1 and of course, 0.3162 / 0.9487 is kept as 1 / 3 ratio
  • That is: 0.4472 * 0.4472 + 0.8944 * 0.8944 = 1 and of course, 0.4472 / 0.8944 is kept as 2 / 4 ratio
  1. Install opencl drivers for your platform
  2. Check what opencl-capable devices with command clinfo
  3. Run the VectorAddOpenCL app [[1]] to see that all works ok.
  4. Implement the normalization operation on a CPU, for reference purposes.
  5. Implement the normalization operation across 1 OpenCL thread of a single device. Check the result against CPU.
  6. Implement the normalization operation across multiple OpenCL threads of the same device. Check the result against CPU.
  7. How much faster is the OpenCL op performed on all threads vs. 1 thread on the same Open CL device ?
  8. Send e-mail to the teacher, with subject PAO_Lab_6, x86 CPU configuration (eg. i7-2670QM 4C/8T @ 2.2 GHz) and GPU configuration (nVidia GT 540M / 96 CudaCores @ 1344 MHz)

Note In order to use the ACS GPGPU Cluster see Using ACS Cluster

Please read chapters 1,2, 4,5 (skip Ch3 which is very particular to CUDA) [GP-GPU Programming guide [2]]


Points (out of 10) vs. expected performance:


[[]]