Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for accelerating operator by calling GPU (Graphics Processing Unit) through OCaml functional language

A technology of language calling and function calling, which is applied in computing, electrical digital data processing, resource allocation, etc., can solve the problem of slow computing speed of operators, and achieve the effect of improving computing speed

Pending Publication Date: 2022-03-08
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The purpose of the present invention is to provide a method for OCaml functional language to call GPU for operator acceleration, which is used for OCaml to call GPU for operator acceleration, which solves the problem that OCaml's operator calculation speed is too slow in the face of a large amount of data, resulting in The improvement of computing efficiency across orders of magnitude solves the problem that OCaml calls GPU to carry out parallel computing simultaneously. In order to achieve the above object, the method of the present invention comprises the following steps:

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for accelerating operator by calling GPU (Graphics Processing Unit) through OCaml functional language
  • Method for accelerating operator by calling GPU (Graphics Processing Unit) through OCaml functional language
  • Method for accelerating operator by calling GPU (Graphics Processing Unit) through OCaml functional language

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The present invention will be described in detail below in conjunction with the accompanying drawings and specific examples.

[0030] Such as figure 1 As shown, the present invention is a kind of OCaml functional language call GPU to carry out the method for operator acceleration, is divided into three steps: write required operator with CUDA code and generate the dynamic link library (*.so that can be called by C language file); use the C function that can be called by OCaml to call the CUDA kernel function in the CUDA dynamic link library, and generate the C dynamic link library (*.so file) that can be called by the OCaml functional language from the C file that contains this C function ; OCaml calls the C function that has called the CUDA kernel function, and links with the C dynamic link library (*.so file) and other required libraries to realize the call of OCaml to the GPU.

[0031] A kind of OCaml functional language of the present invention calls GPU to carry o...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for carrying out operator acceleration by calling a GPU (Graphics Processing Unit) through an OCaml functional language. Comprising the following steps: compiling a required operator by using a CUDA code and generating a dynamic link library capable of being called by a C language; calling a CUDA kernel function in the CUDA dynamic link library by using a C function capable of being called by an OCaml functional language, and generating a C dynamic link library capable of being called by the OCaml; and calling the C function which has called the CUDA kernel function by the OCAML, and linking the C function with the C dynamic link library and other required libraries to realize the calling of the GPU by the OCAML. According to the method, from the perspective of creating and calling the dynamic link library, the OCaml functional language calls the GPU to accelerate the operator, the problem that the OCaml is too low in operator calculation speed for a large amount of data is solved, cross-order-of-magnitude calculation efficiency is improved, and meanwhile the problem that the OCaml calls the GPU to conduct parallel calculation is solved.

Description

technical field [0001] The invention belongs to the field of computer software, and in particular relates to a method for OCaml functional language calling GPU to perform operator acceleration. Background technique [0002] With the rapid development of the OCaml functional language, the parameter data required by many OCaml operators has become larger and larger. OCaml's traditional CPU-based calculation method can no longer meet the needs of intelligent computing. The traditional OCaml operator calculation is performed on the CPU. The CPU is mainly designed for general-purpose computing, which contains fewer arithmetic logic units ALU, and the computing goal of the CPU is to execute dozens of threads in parallel, while the goal of the GPU is to execute thousands of threads in parallel. Therefore, the CPU often struggles when faced with operations with large data. Usually, the data structures that OCaml faces are usually very large, and the calculation time on the CPU will...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/30G06F9/50
CPCG06F8/30G06F9/5027
Inventor 陈钢陈宁
Owner NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products