Python environment parallel computing method and device based on domestic CPU and OS

A parallel computing, domestic technology, applied in the field of python language programming, can solve the problems of complex python program model, low operating efficiency, etc., and achieve the effect of improving the running speed of the program

Pending Publication Date: 2021-12-31
INSPUR QILU SOFTWARE IND
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The technical task of the present invention is to provide a python environment parallel computing method and device based on domestic CPU and OS, which can solve the problem of low operating efficiency of python programs when the model is complex and the amount of calculation is large, and realize the utilization of multi-threading to multi-core

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
  • Python environment parallel computing method and device based on domestic CPU and OS
  • Python environment parallel computing method and device based on domestic CPU and OS

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] The present invention will be further described below in conjunction with specific examples.

[0049] In view of the above problems of slow multi-threading speed of programming programs based on python language, focusing on the improvement of multi-core computing efficiency in the localized environment, C / C++ is a compiled language, and using C / C++ threads to run multi-core is imperative to improve computing efficiency Row.

[0050] The embodiment of the present invention provides a python environment parallel computing method based on domestic CPU and OS, using C / C++ threads to run multi-core, python and C / C++ call each other, put the computationally intensive part into C / C++ for execution, and then The operation result is passed to python, which can break through the limitation of python threads, thereby improving the utilization efficiency of python on CPU multi-core.

[0051] This method bypasses python's GIL lock to achieve multi-core and multi-thread computing th...

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 python environment parallel computing method and device based on a domestic CPU and an OS, and belongs to the technical field of python language programming. According to the method, a C / C + + thread is used for running multiple cores, python and C / C + + call each other, a part with dense operand is put into C / C + + to be executed, and then an operation result is transmitted to the python; the realization of the method comprises a communication module, a parallel module and a calculation module, wherein the communication module is used for inputting to-be-called python algorithm model data and outputting calculation result data of the calculation module; and the calculation module provides a calculation data type for the communication module and provides a calculation function for the parallel module. The method can solve the problem that the python program is low in operation efficiency when the model is complex and the calculation amount is large, and realizes the utilization of multiple cores by multiple threads.

Description

technical field [0001] The invention relates to the technical field of python language programming, in particular to a python environment parallel computing method and device based on domestic CPU and OS. Background technique [0002] As a powerful scripting language, python can be applied when the model is simple and the calculation is not heavy. However, when the model is more complex and the amount of calculation is large, the short board of python will appear, that is, the calculation speed is slow, and the reason is the problem of GIL lock. [0003] When Python was released in 1989, because the computer had not yet reached the main frequency of 1G, the programs were all running on a single-core computer. It was not until 2005 that multi-core processors were developed, but the concept of threads and processes has long been Appeared. So for Python, the concept of multi-threading and multi-process needs to be supported first. For the process, it is very simple, just open...

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): G06F9/52G06F9/54G06F9/50G06F9/48G06F8/30
CPCG06F9/52G06F9/546G06F9/5027G06F9/4881G06F8/315G06F2209/5018
Inventor 郭红亮李超孙桂刚姜玉哲
Owner INSPUR QILU SOFTWARE IND
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products