Parameter adjusting method, device and system

By creating parameter adjustment messages on the host side and using the target interrupt register to adjust GPU parameters, the problems of errors and high cost in the GPU parameters in the prior art are solved, and low-cost and efficient parameter adjustment is achieved.

CN119902806AActive Publication Date: 2025-04-29MOORE THREADS TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411975960.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-29
Estimated Expiration
2044-12-30

AI Technical Summary

Technical Problem

In the prior art, the adjustment of GPU operating parameters is prone to errors and high development and maintenance costs, and the parameters cannot be adjusted directly on the host side due to security policy restrictions.

Method used

By creating a parameter adjustment message on the host side and writing it to the shared memory of the target device, the target interrupt register is used to send an interrupt signal to the system management module, adjusting the GPU parameters is realized and the dependence on the host kernel driver is reduced.

Benefits of technology

The parameter adjustment process minimizes the dependence of the host kernel driver, improves the debugging ability of the program code, low development and maintenance costs, and improves the development speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902806A_ABST
    Figure CN119902806A_ABST
Patent Text Reader

Abstract

The invention relates to a parameter adjustment method, device and system. The method comprises the following steps: if a host detects a parameter adjustment operation for a target device, creating a parameter adjustment message for at least one operating parameter of the target device according to the parameter adjustment operation, wherein the parameter adjustment operation comprises an input operation and / or an adjustment operation for the operating parameter; writing the parameter adjustment message into a shared memory in the target equipment; writing a set value into a target interrupt register of the target equipment, so that the target equipment sends an interrupt signal to a system management module of the target equipment when detecting that the set value is written into the target interrupt register, and the system management module responds to the interrupt signal to obtain a parameter adjustment message from the shared memory and performs parameter adjustment for the target equipment based on the parameter adjustment message. The dependence of the whole parameter adjustment process on the kernel drive of the host is minimized, the debuggeability of the program code for parameter adjustment is high, the development and maintenance cost is low, and the development speed of the program code can be increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a parameter adjustment method, device and system. Background Art

[0002] A graphics processing unit (GPU) is a microprocessor that is specialized in performing image and graphics related computing tasks on personal computers, workstations, game consoles, and some mobile devices (such as tablets, smartphones, etc.). The acquisition and adjustment of a large number of GPU operating parameters is a complex process that requires delicate operations. However, due to the security policy restrictions of the GPU, in order to avoid malicious or unintentional non-safe operations, it is impossible to adjust the GPU parameters directly on the host side. In the related art, the method of adjusting the operating parameters of the GPU has problems such as easy errors and high development and maintenance costs. Summary of the invention

[0003] In view of this, the present disclosure proposes a parameter adjustment method, device and system.

[0004] According to one aspect of the present disclosure, a parameter adjustment method is provided, which is applied to a host, and the method includes:

[0005] In the case of detecting a parameter adjustment operation for a target device, creating a parameter adjustment message according to the parameter adjustment operation, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter;

[0006] Writing the parameter adjustment message into the shared memory in the target device;

[0007] A set value is written into the target interrupt register of the target device, so that when the target device detects that the set value is written into the target interrupt register, it sends an interrupt signal to the system management module of the target device, so that the system management module obtains the parameter adjustment message from the shared memory in response to the interrupt signal, and adjusts the parameters for the target device based on the parameter adjustment message.

[0008] In a possible implementation, the method further includes:

[0009] Obtain device files of each PCIE device connected to the host;

[0010] Memory mapping is performed according to the file handle corresponding to the device file of each PCIE device, and the storage space of each PCIE device is mapped to the corresponding virtual address space;

[0011] The PCIE device includes at least one GPU, the storage space of each GPU includes at least one BAR space, the target device is one or more of the at least one GPU, and the shared memory is located in a BAR space of the GPU serving as the target device.

[0012] In a possible implementation, the method further includes:

[0013] Acquire address information of storage space of each PCIE device connected to the host;

[0014] A device file of each PCIE device is created according to the address information of the storage space of each PCIE device.

[0015] In one possible implementation, the parameter adjustment message includes an IPC message.

[0016] According to another aspect of the present disclosure, a parameter adjustment device is provided, which is applied to a host, and the device includes: a parameter adjustment module, which is used to:

[0017] In the case of detecting a parameter adjustment operation for a target device, creating a parameter adjustment message according to the parameter adjustment operation, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter;

[0018] Writing the parameter adjustment message into the shared memory in the target device;

[0019] A set value is written into the target interrupt register of the target device, so that when the target device detects that the set value is written into the target interrupt register, it sends an interrupt signal to the system management module of the target device, so that the system management module obtains the parameter adjustment message from the shared memory in response to the interrupt signal, and adjusts the parameters for the target device based on the parameter adjustment message.

[0020] In a possible implementation, the parameter adjustment module is further used to obtain a device file of each PCIE device connected to the host; perform memory mapping according to a file handle corresponding to the device file of each PCIE device, and map the storage space of each PCIE device to a corresponding virtual address space;

[0021] The PCIE device includes at least one GPU, the storage space of each GPU includes at least one BAR space, the target device is one or more of the at least one GPU, and the shared memory is located in a BAR space of the GPU serving as the target device.

[0022] In a possible implementation, the device further includes a PCIE driver.

[0023] The PCIE driver is used to obtain the address information of the storage space of each PCIE device connected to the host; and create a device file of each PCIE device according to the address information of the storage space of each PCIE device.

[0024] In one possible implementation, the parameter adjustment message includes an IPC message.

[0025] According to another aspect of the present disclosure, a parameter adjustment method is provided, which is applied to a device, and the method includes:

[0026] In case of receiving an interrupt signal, reading a parameter adjustment message from a shared memory of the device;

[0027] Based on at least one parameter in the parameter adjustment message, perform parameter adjustment for the device;

[0028] Among them, the parameter adjustment message is written into the shared memory by the host controlling the device.

[0029] In a possible implementation, the method further includes:

[0030] The target interrupt register in the device is monitored, and when it is detected that a set value is written into the target interrupt register, the interrupt signal is generated.

[0031] In a possible implementation, the device is one or more PCIE devices connected to the host;

[0032] The PCIE device includes at least one GPU, and the storage space of each GPU includes at least one BAR space. When the device is one or more GPUs in the at least one GPU, the shared memory is located in a BAR space of the GPU.

[0033] In one possible implementation, the parameter adjustment message includes an IPC message.

[0034] According to another aspect of the present disclosure, there is provided a parameter adjustment apparatus, applied to a device, the apparatus comprising: a system management module, a shared memory, and a target interrupt register;

[0035] The system management module is used to read the parameter adjustment message from the shared memory in the case of receiving the interrupt signal; and adjust the parameters of the target device based on at least one operating parameter in the parameter adjustment message;

[0036] Among them, the parameter adjustment message is written into the shared memory by the host controlling the device.

[0037] In a possible implementation manner, the device further includes:

[0038] The monitoring module is used to monitor the target interrupt register and send an interrupt signal to the system management module of the device when detecting that the target interrupt register is written with a set value.

[0039] In a possible implementation, the device is one or more PCIE devices connected to the host;

[0040] The PCIE device includes at least one GPU, and the storage space of each GPU includes at least one BAR space. When the device is one or more GPUs in the at least one GPU, the shared memory is located in a BAR space of the GPU.

[0041] In one possible implementation, the parameter adjustment message includes an IPC message.

[0042] According to another aspect of the present disclosure, an operation parameter adjustment system is provided, including a parameter adjustment module, a system management module, a shared memory and a target interrupt register, wherein the parameter adjustment module is applied to a host, and the system management module, the shared memory and the target interrupt register are applied to a target device.

[0043] The parameter adjustment module is used to, when a parameter adjustment operation for a target device is detected, create a parameter adjustment message according to the parameter adjustment operation, and write the parameter adjustment message into a shared memory in the target device; and then write a set value into a target interrupt register of the target device, so that when the target device detects that the target interrupt register is written with the set value, it sends an interrupt signal to a system management module of the target device, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter;

[0044] The system management module is used to read the parameter adjustment message from the shared memory when an interrupt signal is received; and to adjust the parameters for the target device based on at least one parameter in the parameter adjustment message.

[0045] According to another aspect of the present disclosure, there is provided an operating parameter adjustment device, comprising: a processor; and a memory for storing processor executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0046] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.

[0047] According to another aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0048] The parameter adjustment method, device and system provided by the embodiments of the present disclosure minimize the dependence of the entire parameter adjustment process on the kernel driver of the host, achieve high debuggability of the parameter adjustment program code, low development and maintenance costs, and improve the development speed of the program code.

[0049] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0051] Figure 1 A schematic diagram showing operation parameter adjustment in related technology.

[0052] Figure 2 A block diagram of a parameter adjustment device according to an embodiment of the present disclosure is shown.

[0053] Figure 3 A block diagram of an operating parameter adjustment system according to an embodiment of the present disclosure is shown.

[0054] Figure 4 A schematic diagram of operating parameter adjustment according to an embodiment of the present disclosure is shown.

[0055] Figure 5 A flow chart of a method for adjusting operating parameters according to an embodiment of the present disclosure is shown.

[0056] Figure 6 A flow chart of a method for adjusting operating parameters according to an embodiment of the present disclosure is shown.

[0057] Figure 7 It is a block diagram of a device 1900 for adjusting operating parameters according to an exemplary embodiment. DETAILED DESCRIPTION

[0058] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0059] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0060] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0061] In the related art, the host is used to adjust the operating parameters of the GPU, and the adjustment process is as follows: Figure 1 As shown, the parameter adjustment tool of the application layer running in the host initiates a parameter adjustment request to the host through the ioctl (I / O Control) system interface (an interface used for communication between device drivers and user space programs in the operating system). After receiving the parameter adjustment request, the host's kernel driver constructs an IPC message and initiates IPC (Inner-Process Communication) communication to the GPU. The System Management Unit (SMU) on the GPU adjusts the operating parameters of the components and modules in the GPU accordingly based on the operating parameters in the received IPC message. However, Figure 1 The parameter adjustment process of the method in the above method needs to be implemented by the kernel driver of the host. The parameter adjustment program code runs in the kernel driver, which makes the entire parameter adjustment process limited by the kernel driver. The exception of the kernel driver code will cause the entire device to freeze or hang, and the parameter adjustment cannot be performed. In addition, the code runs in the kernel driver, which is very inconvenient and costly to debug.

[0062] To solve the above problems, the embodiments of the present disclosure provide a parameter adjustment method, device and system, which minimize the dependence of the entire parameter adjustment process on the kernel driver of the host, achieve high debuggability of the parameter adjustment program code, low development and maintenance costs, and improve the development speed of the program code.

[0063] The embodiment of the present disclosure provides an operation parameter adjustment system, which includes parameter adjustment devices respectively applied to a host 100 and each device 200 (the device 200 includes a target device for which operation parameters need to be adjusted). Figure 2As shown, the parameter adjustment device in the host 100 includes a parameter adjustment module 11. The parameter adjustment device in the device 200 includes a shared memory 21, a target interrupt register 22 and a system management module 23.

[0064] The parameter adjustment module 11 is used to create a parameter adjustment message according to the parameter adjustment operation for the target device when a parameter adjustment operation for the target device is detected, and write the parameter adjustment message into the shared memory 21 in the target device; and then write a set value into the target interrupt register 22 of the target device, so that the target device sends an interrupt signal to the system management module 23 when the target device detects that the target interrupt register 22 is written with the set value, and the parameter adjustment message includes at least one operating parameter for the target device. The parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter.

[0065] The system management module 23 is used to read the parameter adjustment message from the shared memory 21 when an interrupt signal is received; and to adjust the parameters for the target device based on at least one parameter in the parameter adjustment message.

[0066] In this embodiment, the parameter adjustment module 11 can be set as a parameter adjustment tool, which runs in the host 100 in the form of a software program, is in the application layer, and can provide users with an interface that can input and / or adjust operating parameters and select target devices. The parameter adjustment tool generates a parameter adjustment operation for a certain target device based on the input operation and / or adjustment operation detected for the interface. Since the parameter adjustment tool runs in the host 100 instead of running in the kernel driver of the host 100, the developer can adjust the code of the parameter adjustment tool as needed, and the debugging of the parameter adjustment tool is very convenient, which reduces the development and maintenance costs of the parameter adjustment tool, and further reduces the development and maintenance costs of host subordinate devices such as GPUs. Moreover, since the parameter adjustment tool runs in the host 100 but not in the kernel driver of the host 100, the parameter adjustment message is directly written to the shared memory during the parameter adjustment process without passing through the kernel driver, so that the entire parameter adjustment process is no longer limited to the kernel driver, ensuring that the parameter adjustment is minimized by the kernel driver of the host.

[0067] In this embodiment, after acquiring the parameter adjustment message, the system management module 23 parses the parameter adjustment message according to the preset data structure definition of the parameter adjustment message to obtain specific operating parameters, and then initiates a parameter adjustment action on the graphics card of the target device based on the specific parameter adjustment conditions targeted by the operating parameters, so that the graphics card can adjust the corresponding modules and devices in the target device based on the operating parameters in the parameter adjustment message. Among them, the data structure definition of the parameter adjustment message can be pre-set, indicating the specific meanings of the parameters at different positions in the entire parameter adjustment message, and / or the specific meanings indicated by the parameters with different identifiers, so as to simplify the parsing process of the parameter adjustment message.

[0068] In this embodiment, since the parameter adjustment module 11 needs to write the parameter adjustment message into the shared memory of the target device, the parameter adjustment module 11 needs to obtain the access capability of the shared memory of each device 200 in advance. The following describes the implementation method of the device to achieve this capability.

[0069] like Figure 3 As shown, the parameter adjustment device in the host 100 also includes a PCIE driver (PCI Express driver, also known as PCIe driver) 12. The device 200 is a PCIE device, that is, the device 200 and the host 100 perform data transmission based on the PCIe (Peripheral Component Interconnect-Epress, peripheral component high-speed interconnect standard) protocol. Then the PCIE driver 12 is used to obtain the address information of the storage space of each PCIE device connected to the host 100 before the parameter adjustment module 11 is initialized for parameter adjustment; according to the address information of the storage space of each PCIE device, a device file (File Handle) of each PCIE device is created. Among them, the PCIE device includes at least one GPU, and the storage space of each GPU includes at least one BAR (Base Address Register) space, and the address information of the GPU can be the starting address and address space length of the BAR space. The target device is one or more of the at least one GPU, and the shared memory 21 is located in a BAR space of the GPU as the target device.

[0070] After the PCIE driver 12 creates the device files of each PCIE device, the parameter adjustment module 11 can obtain the device files of each PCIE device connected to the host 100; perform memory mapping (memory map, mmap) according to the file handle corresponding to the device file of each PCIE device, and map the storage space of each PCIE device to the corresponding virtual address space. Taking the PICE device as a GPU as an example, after the PCIE driver 12 creates the corresponding device file based on the address information of the BAR space of each GPU, the parameter adjustment tool (that is, the parameter adjustment module 11) can open the device file of each GPU during initialization, and then map each BAR space of each GPU to the process space of the parameter adjustment tool based on the mmap method, thereby obtaining the ability to access the BAR space of each GPU.

[0071] In some embodiments, when the PCIE driver 12 detects that the PCIE device connected to the host 100 has changed, the device file can be updated according to the change, such as deleting the device file of the non-existent PCIE device, creating the device file of the newly added PCIE device, and updating the device file of the PCIE device according to the change of the address information of the storage space of the PCIE device. In addition, after determining that the device file update is completed, the PCIE driver 12 can notify the parameter adjustment module 11 of the update status, so that the parameter adjustment module 11 can update the memory mapping of the device file based on the update status of the device file to ensure that the parameter adjustment is accurate.

[0072] In some embodiments, when the device 200 is a GPU, the target interrupt register 22 can be set in a BAR space of the device 200. The shared memory 21 and the target interrupt register in the same device 200 can be set in the same BAR space or in different BAR spaces. The present disclosure does not impose any restrictions on this.

[0073] In this embodiment, in order to ensure smooth parameter adjustment, after writing the parameter adjustment message into the shared memory of the target device, the parameter adjustment module 11 also needs to notify the system management module 23 of the target device that the parameter adjustment needs to be performed. Figure 3 As shown, the parameter adjustment device in the device 200 also includes a monitoring module 24. After writing the parameter adjustment message into the shared memory of the target device, the parameter adjustment module 11 can write a set value into the target interrupt register 22 of the target device. When the monitoring module 24 in the target device detects that the target interrupt register 22 is written with the set value, it sends an interrupt signal to the system management module 23 of the target device. In this way, the system management module 23 can be simply, directly and accurately notified to adjust the operating parameters of the target device.

[0074] In this embodiment, the monitoring module 24 may be implemented by hardware and / or software in each device 200, and the present disclosure does not limit this.

[0075] In some embodiments, the parameter adjustment message may be an IPC message. That is, the parameter adjustment message may be a message based on IPC communication. The operating parameters carried in the parameter adjustment message correspond to the target device. Different target devices may have different types of operating parameters, and the present disclosure does not limit this.

[0076] For example, if Figure 4 As shown, it is assumed that the user needs to adjust the frequency of a GPU from the original 1.5GHz to 1.1GHz. The parameter adjustment tool (i.e., the parameter adjustment module 11) can create an IPC message based on the latest frequency "1.1GHz" input by the user and the selected target GPU (i.e., the target device), and send the IPC message carrying at least the operating parameter "1.1GHz" to the shared memory 21 of each target GPU, and then write the set value to the target interrupt register 22 of each target GPU. For each GPU, the monitoring module 24 thereon will continuously monitor the target interrupt register 22, and when it detects that the target interrupt register 22 is written with the set value, it will send an interrupt signal to the system management module 23 of the device. After receiving the interrupt signal, the system management module 23 will read the IPC message from the shared memory 21, and then adjust its own frequency from the original 1.5GHz to 1.1GHz indicated by the IPC message.

[0077] like Figure 5 As shown, the embodiment of the present disclosure further provides a parameter adjustment method, which is applied to the above host 100, and the method includes:

[0078] Step S401, when a parameter adjustment operation for a target device is detected, creating a parameter adjustment message according to the parameter adjustment operation, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter;

[0079] Step S401, writing the parameter adjustment message into the shared memory in the target device;

[0080] Step S401, write a set value into the target interrupt register of the target device, so that when the target device detects that the set value is written into the target interrupt register, it sends an interrupt signal to the system management module of the target device, so that the system management module obtains the parameter adjustment message from the shared memory in response to the interrupt signal, and adjusts the parameters for the target device based on the parameter adjustment message.

[0081] In a possible implementation, the method may further include:

[0082] Obtain device files of each PCIE device connected to the host; perform memory mapping according to the file handle corresponding to the device file of each PCIE device, and map the storage space of each PCIE device to the corresponding virtual address space;

[0083] The PCIE device includes at least one GPU, the storage space of each GPU includes at least one BAR space, the target device is one or more of the at least one GPU, and the shared memory is located in a BAR space of the GPU serving as the target device.

[0084] In a possible implementation, the method may further include: controlling a PCIE driver of the host to obtain address information of a storage space of each PCIE device connected to the host; and creating a device file of each PCIE device according to the address information of the storage space of each PCIE device.

[0085] In one possible implementation, the parameter adjustment message includes an IPC message.

[0086] like Figure 6 As shown, the embodiment of the present disclosure further provides a parameter adjustment method, which is applied to the above-mentioned device 200, and the method includes:

[0087] Step S501, when an interrupt signal is received, reading a parameter adjustment message from a shared memory of the device;

[0088] Step S501, adjusting parameters for the device based on at least one parameter in the parameter adjustment message;

[0089] Among them, the parameter adjustment message is written into the shared memory by the host controlling the device.

[0090] In a possible implementation, the device is one or more PCIE devices connected to the host;

[0091] The PCIE device includes at least one GPU, and the storage space of each GPU includes at least one BAR space. When the device is one or more GPUs in the at least one GPU, the shared memory is located in a BAR space of the GPU.

[0092] In a possible implementation, the method may further include:

[0093] A target interrupt register in the device is monitored, and when it is detected that a set value is written into the target interrupt register, an interrupt signal is sent to a system management module of the device.

[0094] In one possible implementation, the parameter adjustment message includes an IPC message.

[0095] In some embodiments, the functions or modules included in the device or system provided in the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementations and beneficial effects of the methods, devices, and systems can be referenced to each other. For the sake of brevity, they will not be repeated here.

[0096] It should be noted that although the parameter adjustment method, device and system are described above by taking the above embodiments as examples, those skilled in the art will appreciate that the present disclosure should not be limited thereto. In fact, users can flexibly set each module and step according to personal preferences and / or actual application scenarios, as long as they comply with the technical solution of the present disclosure.

[0097] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.

[0098] The embodiment of the present disclosure also proposes a parameter adjustment device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.

[0099] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.

[0100] Figure 7 1 is a block diagram of an apparatus 1900 for adjusting operating parameters according to an exemplary embodiment. For example, the apparatus 1900 may be provided as a server or a terminal device. Figure 7, the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0101] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output interface 1958 (I / O interface). The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2000. TM , MacOS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.

[0102] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.

[0103] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0104] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (Digital Versatile Disc or Digital Video Disc, DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. The computer-readable storage medium used herein is not to be construed as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., light pulses through a fiber optic cable), or an electrical signal transmitted through wires.

[0105] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0106] The computer program instructions for performing the disclosed operation may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, by utilizing the state information of computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA) or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure.

[0107] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0108] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0109] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0110] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0111] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A parameter adjustment method, characterized in that: Applied to a host, the method comprises: In the case of detecting a parameter adjustment operation for a target device, creating a parameter adjustment message according to the parameter adjustment operation, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter; Writing the parameter adjustment message into the shared memory in the target device; A set value is written into the target interrupt register of the target device, so that when the target device detects that the set value is written into the target interrupt register, it sends an interrupt signal to the system management module of the target device, so that the system management module obtains the parameter adjustment message from the shared memory in response to the interrupt signal, and adjusts the parameters for the target device based on the parameter adjustment message.

2. The method according to claim 1, characterized in that The method further comprises: Obtain device files of each PCIE device connected to the host; Memory mapping is performed according to the file handle corresponding to the device file of each PCIE device, and the storage space of each PCIE device is mapped to the corresponding virtual address space; The PCIE device includes at least one GPU, the storage space of each GPU includes at least one BAR space, the target device is one or more of the at least one GPU, and the shared memory is located in a BAR space of the GPU serving as the target device.

3. The method according to claim 2, characterized in that The method further comprises: Acquire address information of storage space of each PCIE device connected to the host; A device file of each PCIE device is created according to the address information of the storage space of each PCIE device.

4. The method according to claim 1, characterized in that Parameter adjustment messages include IPC messages.

5. An operating parameter adjustment device, characterized in that: Applied to a host, the device comprises: a parameter adjustment module, which is used to: In the case of detecting a parameter adjustment operation for a target device, creating a parameter adjustment message according to the parameter adjustment operation, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter; Writing the parameter adjustment message into the shared memory in the target device; A set value is written into the target interrupt register of the target device, so that when the target device detects that the set value is written into the target interrupt register, it sends an interrupt signal to the system management module of the target device, so that the system management module obtains the parameter adjustment message from the shared memory in response to the interrupt signal, and adjusts the parameters for the target device based on the parameter adjustment message.

6. The device according to claim 5, characterized in that The parameter adjustment module is further used to obtain the device files of each PCIE device connected to the host; perform memory mapping according to the file handle corresponding to the device file of each PCIE device, and map the storage space of each PCIE device to the corresponding virtual address space; The PCIE device includes at least one GPU, the storage space of each GPU includes at least one BAR space, the target device is one or more of the at least one GPU, and the shared memory is located in a BAR space of the GPU serving as the target device.

7. The device according to claim 6, characterized in that The device also includes a PCIE driver, The PCIE driver is used to obtain the address information of the storage space of each PCIE device connected to the host; and create a device file of each PCIE device according to the address information of the storage space of each PCIE device.

8. The device according to claim 5, characterized in that Parameter adjustment messages include IPC messages.

9. A parameter adjustment method, characterized in that: Applied to a device, the method comprises: In case of receiving an interrupt signal, reading a parameter adjustment message from a shared memory of the device; Based on at least one parameter in the parameter adjustment message, perform parameter adjustment for the device; Among them, the parameter adjustment message is written into the shared memory by the host controlling the device.

10. The method according to claim 9, characterized in that The method further comprises: The target interrupt register in the device is monitored, and when it is detected that a set value is written into the target interrupt register, the interrupt signal is generated.

11. A parameter adjustment device, characterized in that: Applied to a device, the device comprises: a system management module, a shared memory and a target interrupt register; The system management module is used to read the parameter adjustment message from the shared memory in the case of receiving the interrupt signal; and adjust the parameters of the target device based on at least one operating parameter in the parameter adjustment message; Among them, the parameter adjustment message is written into the shared memory by the host controlling the device.

12. The device according to claim 11, characterized in that The device also includes: The monitoring module is used to monitor the target interrupt register and send an interrupt signal to the system management module of the device when detecting that the target interrupt register is written with a set value.

13. An operating parameter adjustment system, characterized in that: It includes parameter adjustment module, system management module, shared memory and target interrupt register. The parameter adjustment module is applied to the host, and the system management module, shared memory and target interrupt register are applied to the target device. The parameter adjustment module is used to, when a parameter adjustment operation for a target device is detected, create a parameter adjustment message according to the parameter adjustment operation, and write the parameter adjustment message into a shared memory in the target device; and then write a set value into a target interrupt register of the target device, so that when the target device detects that the target interrupt register is written with the set value, it sends an interrupt signal to a system management module of the target device, wherein the parameter adjustment message includes at least one operating parameter for the target device, and the parameter adjustment operation includes an input operation and / or an adjustment operation for the operating parameter; The system management module is used to read the parameter adjustment message from the shared memory when an interrupt signal is received; and to adjust the parameters for the target device based on at least one parameter in the parameter adjustment message.

14. A parameter adjustment device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 4, or the method described in claim 9 or 10 when executing the instructions stored in the memory.

15. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 4 is implemented, or the method described in claim 9 or 10 is implemented.

Citation Information

Patent Citations

  • Working parameter adjusting method, host, display card, electronic equipment and storage medium

    CN116414471A

  • Data processing method and device, electronic equipment and readable storage medium

    CN116954991A

  • PCIe resource allocation method and device, electronic equipment and storage medium

    CN118034917A

  • GPU instruction processing front-end simulation device, system and method and storage medium

    CN118860495A

  • Virtual machine memory sharing method and system and computer equipment

    CN119179551A