This specific module helps interns use Apple Silicon chips (the company has M4 and M5 Series), leveraging Unified Memory hardware and integrated GPUs to accelerate graphics processing as well as AI training/inference.


Required knowledge to grasp after the internship


  • Apple Silicon Hardware Knowledge: Understand the Unified Memory Architecture and the role of the Neural Engine, GPU Core.

  • Deep Learning Library Knowledge: Proficient in basic PyTorch (torch.nn, Tensor).

  • MPS Concepts: Understand how PyTorch uses the torch.device("mps") backend instead of Nvidia's torch.device("cuda") on macOS.


Execution sequence


  1. Receive server information: Log in to the system https://dev.mdcgroup.vn, request remote account allocation (SSH/VNC) to the company's Mac Studio/Mac Mini cluster.

  2. Native Environment Setup: Install the Conda package manager (Miniforge specifically for ARM64 architecture). Initialize the Python environment and install the latest PyTorch version supporting native MPS.

  3. Hardware Verification via Code: Write a short Python script using the torch.backends.mps.is_available() command to verify that the system has successfully enabled acceleration using the Apple graphics chip.

  4. Perform Tensor Computation Conversion: Write code to create large matrices, perform device processing conversion (tensor.to("mps")), and compare the execution speed of matrix multiplication operations between pure CPU and MPS devices.

  5. Model Training/Inference Experiment: Take a sample Deep Learning model (such as ResNet or a simple CNN). Proceed to run the Train/Inference flow on the MPS device, monitoring RAM usage, temperature, and power consumption via Activity Monitor or the CLI tool powermetrics.

  6. Optimization Comparison: Write a script to evaluate application runtime on the same workload between enabling MPS and disabling MPS (using only CPU).


Result acceptance


  • Quiz: Take a quiz on computer architecture and the MPS Framework on the internal page.

  • Questions & Suggestions: Provide feedback on the cost-effectiveness and energy consumption of the Apple Silicon cluster when running AI compared to clusters running traditional GPUs.

  • Report Results: Submit a performance comparison file (processing time chart) along with clean test source code to the manager.

  • Weekend Discussion: Share experiences handling mathematical functions not fully supported by MPS at the Saturday discussion session.