OpenCL PyTorch的实现方法
By linking the OpenCL operator library and kernel function library on OpenCL devices, the problem of PyTorch framework being unable to train models on OpenCL devices is solved, realizing a complete deep learning framework that supports model training and deployment according to the OpenCL programming standard.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANKAI UNIV
- Filing Date
- 2023-07-17
- Publication Date
- 2026-07-17
AI Technical Summary
The existing PyTorch framework cannot directly train models on OpenCL devices. It can only convert the trained model into a PyTorch Mobile-compatible model to perform model inference on OpenCL devices. It cannot implement an OpenCL version of the PyTorch framework.
By implementing an OpenCL operator library based on the OpenCL standard, a link is established between the OpenCL operator library and the OpenCL kernel function library. Based on the OpenCL operator library, the PyTorch framework calls the OpenCL kernel function library, including obtaining operator call information, determining the calculation steps and target kernel function, encapsulating the data to be calculated, and calling the target kernel function in the OpenCL kernel function library to perform the calculation.
It implements complete deep learning model training and deployment of the PyTorch framework on OpenCL devices, covering approximately 400 commonly used operators, and enhances the portability and adaptability of the OpenCL backend.
Smart Images

Figure CN116976430B_ABST