Skip to content

massoudasadi/CPUGPUComputingEvaluation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU cores computing strength and GPU computing strength using Python

Repository Name: CPUGPUComputingEvaluation

(1) Objective:

The objective of this project is to evaluate the CPU cores and GPU computing strengths in various scenarios using Python, considering different types of computational tasks.

(2) Setup:

Ensure that your computer has a CPU with multiple cores and a dedicated GPU. Install the necessary Python libraries for CPU and GPU computations, such as NumPy, TensorFlow, and PyTorch.

(3) Scenarios:

(3-1) Matrix Multiplication:

Write a Python function that performs matrix multiplication using CPU computation. Utilize the NumPy library for efficient matrix operations. Measure the execution time for matrix multiplication of various sizes using the time module or a performance profiling library. Run the function multiple times and record the average execution time for each matrix size. Repeat the same process for GPU computation using a GPU-accelerated library like TensorFlow or PyTorch. Compare the average execution times between CPU and GPU for different matrix sizes.

(3-2) Image Processing:

Write a Python function that performs image processing operations, such as image filtering or edge detection, using CPU computation. Utilize libraries like OpenCV or PIL (Python Imaging Library) for image processing tasks. Measure the execution time for image processing operations on various image sizes. Repeat the process for GPU computation using GPU-accelerated libraries. Compare the average execution times between CPU and GPU for different image sizes.

(4)Comparative Analysis:

Analyze the performance differences between CPU and GPU in each scenario. Consider factors such as the workload complexity, parallelization capabilities, and data sizes. Identify scenarios where CPU outperforms GPU or vice versa. Visualize the results using Python plotting libraries to present a clear comparison. Conclusion:

Summarize the findings from the evaluation and analysis of different scenarios. Discuss the strengths and limitations of CPU and GPU computing for each scenario. Provide insights into the scenarios where each computing resource is more suitable based on performance considerations. Remember to document your code, provide clear instructions, and make it easily reproducible for others to understand and replicate your project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%