Repurposing AI Accelerators for Real-Time Graphics
- •Preferred Networks has developed a transpiler that allows GLSL code to run on their MN-Core 2 AI accelerator.
- •By optimizing model conversion through PyTorch, the system projects 71.5fps performance in Full HD resolution.
- •The project successfully offloads specialized GPU trigonometric functions to software-based logic, enabling high-performance parallel computation for CG rendering.
Preferred Networks, a leading Japanese research company specializing in deep learning, is exploring new frontiers for their proprietary 'MN-Core 2' accelerator. While traditionally built for AI training, its massive parallel processing architecture holds significant potential for other compute-heavy fields. A recent summer internship project demonstrated a novel technique for running standard graphics shaders directly on this AI-focused hardware.
The technical core of this challenge involved creating a custom transpiler that converts GLSL code—a language standard for programmable graphics—into PyTorch models that MN-Core can execute. Beyond simple translation, the team had to bridge architectural gaps by implementing hardware-aware memory management and optimizing how parallel operations are distributed across the chip.
The engineering team encountered several hurdles, including replicating GLSL’s unique broadcasting behaviors and managing conditional logic flow. To overcome these, they introduced optimizations to eliminate redundant memory operations and refined the granularity of their calculations. By re-engineering the way tensors were structured for the MN-Core hardware, they successfully bypassed potential bottlenecks in memory layout.
Since the MN-Core lacks the specialized hardware units for fast transcendental functions found in modern GPUs, the team implemented software-based approximations for trigonometric calculations. This creative workaround proved highly effective, ultimately achieving a smooth, practical frame rate at Full HD resolution. The project stands as a testament to the versatility of modern AI silicon.
This endeavor proves that even specialized AI hardware can handle general parallel tasks when the correct abstraction layers are built. It provides a blueprint for how existing AI infrastructure might be leveraged for diverse computational needs beyond deep learning. For students, this result highlights the immense creative possibilities that arise when bridging the gap between artificial intelligence and computer graphics.