Temperature adjusting method and device and electronic equipment
By predicting the heat generation parameters of the memory and combining them with fan and water cooling temperature control, the heat dissipation problem in the in-memory computing architecture was solved, improving the timeliness and accuracy of temperature control, and enhancing processor performance and computing efficiency.
Patent Information
- Application Number
- CN202410471874.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2025-10-24
AI Technical Summary
In in-memory computing architectures, memory heat dissipation issues severely impact processor performance, and existing adaptive temperature control methods suffer from poor timeliness and low accuracy.
The processor estimates the calculated heat generation parameters of the memory, and uses the heat generation coefficient and data volume for real-time temperature control. Combined with a fan and water-cooling temperature control device, the memory temperature is dynamically adjusted.
It enables real-time and precise control of memory temperature, improves processor performance and computing efficiency, and reduces the impact of heat dissipation on the system.
Smart Images

Figure CN120831998A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and in particular to a temperature regulation method and device and electronic equipment. BACKGROUND
[0002] At present, a large-scale computing task needs multiple processors of different types to jointly compute. For example, the multiple processors of different types can include a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and the like. A large amount of computation causes a large amount of data exchange between the processors and the memory. With the increasing difficulty of memory scaling, the large amount of data exchange becomes a bottleneck that restricts the performance (including the computing efficiency and energy consumption) of the processors. Generally, the phenomenon that the performance of the memory limits the performance of the processors is referred to as a memory wall (MW).
[0003] A memory of a process-in-memory (PIM) architecture can solve the MW phenomenon. Specifically, the memory of the PIM architecture includes a storage unit and a logic unit. The logic unit can perform computation of data. The logic unit performs part of the computing task that is originally performed by the processor, reduces the data exchanged between the memory and the processor, and also improves the parallelism of the computation.
[0004] However, the computation by using the logic unit in the memory of the PIM architecture exacerbates the heat dissipation problem in the memory of the PIM architecture. SUMMARY
[0005] Embodiments of the present application provide a temperature regulation method and device and electronic equipment, and relate to the technical field of communication. The temperature regulation method and device and electronic equipment are used to control the temperature of the memory and improve the timeliness and certainty of temperature regulation.
[0006] To achieve the above object, embodiments of the present application adopt the following technical solutions:
[0007] In a first aspect, a temperature adjusting method is provided, which is applied to a temperature adjusting device including a processor connected with a memory. The method comprises: obtaining, by the processor, a heat generation coefficient corresponding to at least one calculation type in a target task from the memory, and estimating a calculation heat generation parameter of the memory according to a data amount of data in a target address and the heat generation coefficient, the target address being an address of data corresponding to the at least one calculation type in the target task in the memory; sending, by the processor, a calculation instruction to the memory, the calculation instruction being used to instruct the memory to calculate the data in the target address according to the at least one calculation type; and outputting, by the processor, a control signal according to the calculation heat generation parameter of the memory and a current heat dissipation parameter of the memory, the control signal being used to control a temperature of the memory when the memory calculates the data in the target address according to the at least one calculation type.
[0008] In the above technical solution, before the processor sends the calculation instruction to the memory, the processor obtains the heat generation coefficient corresponding to the at least one calculation type in the target task from the memory, and estimates the calculation heat generation parameter of the memory according to the data amount of the data in the target address and the heat generation coefficient. The heat generation coefficient is the heat generation coefficient corresponding to the at least one calculation type, and each calculation type corresponds to a heat generation coefficient. According to the heat generation coefficient and the data amount of the data in the target address, the calculation heat generation parameter of the memory in the calculation process is estimated, that is, the actual heat generated by the memory in the calculation process is determined, the accuracy of the calculation heat generation parameter is improved, and the temperature of the memory is controlled according to the calculation heat generation parameter and the current heat dissipation parameter of the memory, the accuracy of the temperature control is improved. On the other hand, the calculation heat generation parameter is determined before the memory receives the calculation instruction. In the process of calculating the data in the target address according to the at least one calculation type, the processor can control the temperature of the memory according to the calculation heat generation parameter and the current heat dissipation parameter of the memory, that is, the temperature of the memory can be controlled in real time without the historical temperature of the memory, and the timeliness is improved.
[0009] In a possible implementation manner of the first aspect, the method further comprises: determining, by the processor, the heat generation coefficient corresponding to the at least one calculation type when compiling a program corresponding to the target task; and storing, by the processor, the heat generation coefficient corresponding to the at least one calculation type in the memory. In the above possible implementation manner, the heat generation coefficient is determined when the program corresponding to the target task is compiled, and the accuracy of the calculation heat generation coefficient is improved.
[0010] In a possible implementation of the first aspect, the current heat dissipation parameter of the memory is related to a first temperature control mode of the memory and an ambient temperature in which the memory is located, the first temperature control mode being a temperature control mode before the memory receives the computing instruction, and the current heat dissipation parameter is used to represent a heat dissipation capability of the memory. In the possible implementation, the current heat dissipation parameter of the memory is related to the first temperature control mode of the memory and the ambient temperature in which the memory is located, and the temperature of the memory is controlled according to the current heat dissipation parameter of the memory and the computing heat generation parameter, thereby improving the accuracy of temperature control.
[0011] In a possible implementation of the first aspect, the processor estimates the computing heat generation parameter of the memory according to the data amount of the data in the target address and the heat generation coefficient, including: the processor estimates a computing amount and a computing frequency of the memory according to the data amount of the data in the target address and the heat generation coefficient; and the processor estimates the computing heat generation parameter according to the computing amount and the computing frequency. In the possible implementation, the actual computing amount and the actual computing frequency of the memory can be estimated according to the data amount of the data in the target address and the heat generation coefficient, and the computing heat generation can be estimated according to the applied computing amount and the computing frequency, thereby improving the accuracy of the computing heat generation parameter.
[0012] In a possible implementation of the first aspect, the processor is further configured to be connected with the temperature control device, and the processor outputs a control signal according to the computing heat generation parameter of the memory and the current heat dissipation parameter of the memory, including: when the processor determines, according to the computing heat generation parameter of the memory and the current heat dissipation parameter of the memory, that the temperature of the memory at a first time is higher than a first temperature threshold, the processor outputs a first control signal, the first control signal being used to control the temperature control device to control the temperature of the memory at a second time, the second time being not later than the first time; or when the processor determines, according to the computing heat generation parameter of the memory and the current heat dissipation parameter of the memory, that the temperature of the memory at the first time is lower than a second temperature threshold, the processor outputs a second control signal, the second control signal being used to control the temperature control device to control the temperature of the memory at a third time, the third time being not later than the first time. In the possible implementation, the control signal is used to control the temperature control device to control the temperature of the memory at different times, so that the temperature of the memory during the computing process is always maintained within a range of the second temperature threshold and the first temperature threshold, thereby ensuring the normal operation of the memory and improving the working efficiency of the memory.
[0013] In a possible implementation manner of the first aspect, the first control signal is used to control the temperature adjusting device to adjust the storage device according to a second temperature adjusting manner at the second time, and the temperature adjusting amount corresponding to the second temperature adjusting manner is greater than the temperature adjusting amount corresponding to the first temperature adjusting manner; or the second control signal is used to control the temperature adjusting device to adjust the storage device according to a third temperature adjusting manner at the third time, and the temperature adjusting amount corresponding to the third temperature adjusting manner is less than the temperature adjusting amount corresponding to the first temperature adjusting manner. In the possible implementation manner, the control signal is used to control the temperature adjusting device to adjust the storage device according to different temperature adjusting manners at different times, so that the temperature of the storage device is within the range of the second temperature threshold and the first temperature threshold, and the normal operation of the storage device is ensured, and the working efficiency of the storage device is improved.
[0014] In a possible implementation manner of the first aspect, the method further includes: selecting, by the processor, the second temperature adjusting manner and the second time from the plurality of temperature adjusting manners according to the calculated heat generation parameter and the current heat dissipation parameter; or selecting, by the processor, the third temperature adjusting manner and the third time from the plurality of temperature adjusting manners according to the calculated heat generation parameter and the current heat dissipation parameter. In the possible implementation manner, different temperature adjusting manners are selected at different times for temperature adjusting, and the selectability is increased.
[0015] In a possible implementation manner of the first aspect, the temperature adjusting device includes a water cooling temperature adjusting device and a fan temperature adjusting device, and the temperature adjusting manner includes at least one of the following: fan first frequency temperature adjusting, fan second frequency temperature adjusting, fan third frequency temperature adjusting, and water cooling temperature adjusting, wherein the first frequency is less than the second frequency, and the second frequency is less than the third frequency. In the possible implementation manner, the selectability is increased.
[0016] In a second aspect, a temperature adjusting device is provided, which is used in connection with a storage device. The temperature adjusting device includes: an acquisition unit configured to acquire, from the storage device, a heat generation coefficient corresponding to at least one calculation type in a target task; a prediction unit configured to predict a calculated heat generation parameter of the storage device according to a data amount of data in a target address and the heat generation coefficient, the target address being an address of the data corresponding to the at least one calculation type in the target task in the storage device; a sending unit configured to send a calculation instruction to the storage device, the calculation instruction being used to instruct the storage device to calculate the data in the target address according to the at least one calculation type; and the sending unit is further configured to output a control signal according to the calculated heat generation parameter of the storage device and a current heat dissipation parameter of the storage device, the control signal being used to control a temperature of the storage device when the storage device calculates the data in the target address according to the at least one calculation type.
[0017] In a possible implementation manner of the second aspect, the temperature adjustment apparatus further includes: a compiling unit, configured to determine the heat generation coefficient corresponding to the at least one type of calculation when compiling the program corresponding to the target task; and a sending unit, configured to store the heat generation coefficient corresponding to the at least one type of calculation in the memory.
[0018] In a possible implementation manner of the second aspect, the current heat dissipation parameter of the memory is related to a first temperature adjustment mode of the memory and an ambient temperature where the memory is located.
[0019] In a possible implementation manner of the second aspect, the estimation unit is further configured to: estimate the calculation amount and the calculation frequency of the memory according to the data amount of the data in the target address and the heat generation coefficient; and estimate the calculation heat generation parameter according to the calculation amount and the calculation frequency.
[0020] In a possible implementation manner of the second aspect, the temperature adjustment apparatus is further configured to be connected with the temperature adjustment device, and when the estimation unit determines that the temperature of the memory at the first time is higher than the first temperature threshold value according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, the sending unit is further configured to: output a first control signal, the first control signal being used to control the temperature adjustment device to adjust the temperature of the memory at a second time, the second time being not later than the first time. Or, when the estimation unit determines that the temperature of the memory at the first time is lower than a second temperature threshold value according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, the sending unit is further configured to: output a second control signal, the second control signal being used to control the temperature adjustment device to adjust the temperature of the memory at a third time, the third time being not later than the first time.
[0021] In a possible implementation manner of the second aspect, the first control signal is used to control the temperature adjustment device to adjust the temperature of the memory according to a second temperature adjustment mode at the second time, the temperature adjustment amount corresponding to the second temperature adjustment mode being greater than the temperature adjustment amount corresponding to the first temperature adjustment mode; or the second control signal is used to control the temperature adjustment device to adjust the temperature of the memory according to a third temperature adjustment mode at the third time, the temperature adjustment amount corresponding to the third temperature adjustment mode being less than the temperature adjustment amount corresponding to the first temperature adjustment mode.
[0022] In a possible implementation manner of the second aspect, the temperature adjustment apparatus further includes a determination unit, configured to: select the second temperature adjustment mode and the second time from a plurality of temperature adjustment modes according to the calculation heat generation parameter and the current heat dissipation parameter of the memory. Or, select the third temperature adjustment mode and the third time from the plurality of temperature adjustment modes according to the calculation heat generation parameter and the current heat dissipation parameter of the memory.
[0023] In a possible implementation manner of the second aspect, the temperature adjusting device includes a water cooling temperature adjusting device and a fan temperature adjusting device, and the temperature adjusting manner includes at least one of the following: fan first frequency temperature adjusting, fan second frequency temperature adjusting, fan third frequency temperature adjusting, and water cooling temperature adjusting, wherein the first frequency is less than the second frequency, and the second frequency is less than the third frequency.
[0024] In a third aspect, a temperature adjusting device is provided, which includes a processor and a memory. The processor is configured to execute the temperature adjusting method provided in the first aspect or any possible implementation manner of the first aspect, to adjust the temperature of the memory.
[0025] In a fourth aspect, an electronic device is provided, which includes a processor, a memory and a temperature adjusting device. The processor is configured to execute the temperature adjusting method provided in the first aspect or any possible implementation manner of the first aspect. The processor is further configured to output a control signal to the temperature adjusting device, and the temperature adjusting device is configured to control the temperature of the memory according to the control signal.
[0026] In another aspect of the present application, a computer readable storage medium is provided, which stores a computer program or instructions. When the computer program or instructions are executed on a temperature adjusting device, the temperature adjusting device executes the temperature adjusting method provided in the first aspect or any possible implementation manner of the first aspect.
[0027] In another aspect of the present application, a computer program product is provided, which includes a computer program (also referred to as code or instructions). When the computer program is executed on a temperature adjusting device, the temperature adjusting device executes the temperature adjusting method provided in the first aspect or any possible implementation manner of the first aspect.
[0028] It can be understood that the temperature adjusting device, the computer readable storage medium and the computer program product provided in the above embodiments can achieve the beneficial effects as described in the temperature adjusting method provided in the above embodiments, which will not be described herein. BRIEF DESCRIPTION OF DRAWINGS
[0029] Figure 1 A schematic diagram of data volume between a processor and a memory provided in an embodiment of the present application;
[0030] Figure 2 A schematic diagram of heat generated when different data volumes are calculated in different types provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0032] Figure 4A structural diagram of a temperature adjusting device provided for an embodiment of the present application is shown in FIG. 1.
[0033] Figure 5 A flow chart of a temperature adjusting method provided for an embodiment of the present application is shown in FIG. 2.
[0034] Figure 6 A schematic diagram of calculating a heat generation parameter provided for an embodiment of the present application is shown in FIG. 3.
[0035] Figure 7 A flow chart of another temperature adjusting method provided for an embodiment of the present application is shown in FIG. 4.
[0036] Figure 8 A flow chart of yet another temperature adjusting method provided for an embodiment of the present application is shown in FIG. 5.
[0037] Figure 9 A schematic diagram of exchanging data between a memory and a processor provided for an embodiment of the present application is shown in FIG. 6.
[0038] Figure 10 A flow chart of yet another temperature adjusting method provided for an embodiment of the present application is shown in FIG. 7.
[0039] Figure 11 A structural diagram of a temperature adjusting device provided for an embodiment of the present application is shown in FIG. 1. DETAILED DESCRIPTION
[0040] In the present application, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple. In addition, the present application uses "first", "second", and the like to distinguish the same or similar items with basically the same function and effect. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and do not limit the order. Those skilled in the art can understand that "first", "second", and the like do not limit the quantity and execution order.
[0041] It should be noted that the words "exemplary" or "for example" are used herein to mean an example, instance, or illustration. Any embodiment or design solution described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or design solutions. Rather, the illustrative words are used to present concepts in a particular, concrete form. Embodiments of the application are described herein with reference to the following drawings.
[0042] Before introducing the embodiments of the present application, the related knowledge of the memory of the process-in-memory (PIM) architecture is first described.
[0043] At present, a large-scale computing task needs multiple different types of processors to jointly compute, for example, the multiple different types of processors can include a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), and the like. A large amount of computation causes a large amount of data exchange between the processor and the memory. For example, Figure 1 is a schematic diagram of the data amount between the processor and the memory in different years. The abscissa is the year, and the ordinate represents the data amount exchanged between the processor and the memory. With the continuous development of artificial intelligence technology, the computing demand is increasing, and the data amount exchanged between the processor and the memory is also increasing. For example, the data amount exchanged between the processor and the memory in 2024 is 120 Zettabyte (ZB), and the data amount exchanged between the processor and the memory in 2019 is 40 ZB. The data amount in 2019 is about 3 times the data amount in 2024. It is predicted that the data amount exchanged between the processor and the memory in 2025 will reach 160 ZB.
[0044] With the increasing difficulty of memory scaling, a large amount of data exchange has become the main bottleneck restricting the performance (including computing efficiency and energy consumption) of the processor. The phenomenon of limiting the performance of the processor by the performance of the memory is called memory wall (MW). At present, the PIM architecture memory can solve the MW phenomenon. Specifically, the PIM architecture memory includes a storage unit and a logic unit. The logic unit can perform data computation. The logic unit performs part of the computing task originally performed by the processor, reduces the data exchanged between the memory and the processor, and also improves the parallelism of the computation.
[0045] However, using the logic unit in the PIM architecture memory to perform computation exacerbates the heat dissipation problem in the PIM architecture memory. For example, Figure 2is a diagram of heat generated by logical units in a PIM architecture memory when performing different types of calculations on different amounts of data, where the horizontal axis represents different amounts of data and different types of calculations, including addition (A) calculations, multiplication (M) calculations, and floating-point addition (FPA) calculations, and the vertical axis represents heat in picojoules (PJ), generated by Figure 2 It can be seen that, for the same type of calculation task, the greater the amount of data calculated, the more heat generated, for example, the heat generated by the addition calculation of 8 bite (b) data is less than that of the addition calculation of 32 b data, and for different types of calculation tasks, when the amount of data calculated is the same, the more complex the calculation type, the more heat generated, for example, the heat generated by the addition calculation of 8 b data is less than that of the multiplication calculation of 8 b data.
[0046] In one possible embodiment, the temperature of the PIM architecture memory is adjusted in an adaptive temperature adjustment manner. Specifically, when the logical units in the PIM architecture memory perform calculations, the temperature sensors in the PIM architecture memory detect and record the historical temperature of the PIM architecture memory within a certain period, and send the historical temperature to the processor, which can be used to learn and predict the change trend of the temperature in the PIM architecture memory through artificial intelligence (AI), and send a control signal to the temperature adjustment device according to the change trend, which can be used to control the temperature in the memory according to the control signal, for example, the temperature adjustment device can include a water-cooled cooling device, a fan temperature adjustment device and other temperature adjustment devices that can be used to adjust the temperature in the memory.
[0047] However, adaptive temperature adjustment requires a certain period of historical temperature, which is time-consuming and has low accuracy.
[0048] Based on this, the embodiment of the present application provides a temperature regulation method, which is applied to a temperature regulation device, and the temperature regulation device includes a processor, and the processor is connected with a memory. In the temperature regulation method provided by the embodiment of the present application, before the processor sends a calculation instruction to the memory, the calculation instruction is used to instruct the memory to calculate data in a target address according to at least one calculation type in a target task. The processor obtains a heat generation coefficient corresponding to the at least one calculation type from the memory, and estimates a calculation heat generation parameter of the memory according to the heat generation coefficient and a data amount of the data in the target address. The heat generation coefficient is a heat generation coefficient corresponding to each calculation type, and each calculation type corresponds to a heat generation coefficient. The calculation heat generation parameter of the memory is estimated according to the heat generation coefficient and the data amount of the data in the target address, that is, the actual heat generated by the memory in the calculation process is determined, the accuracy of the calculation heat generation parameter is improved, the temperature of the memory is controlled according to the calculation heat generation parameter and a current heat dissipation parameter of the memory, and the accuracy of the temperature regulation is improved. On the other hand, the calculation heat generation parameter is determined before the memory receives the calculation instruction. In the process in which the memory calculates the data in the target address according to the at least one calculation type, the processor can control the temperature of the memory according to the calculation heat generation parameter and the current heat dissipation parameter of the memory, that is, the temperature of the memory can be controlled in real time without the historical temperature of the memory, and the timeliness is improved.
[0049] The temperature regulation method provided by the embodiment of the present application can be applied to an electronic device. In the following, the structure of the electronic device is introduced and described. Figure 3 The structure of the electronic device is introduced and described.
[0050] Exemplarily, Figure 3 A structure diagram of an electronic device provided by the embodiment of the present application is shown in FIG. 3. The electronic device 30 can include a processor 310, a bus 320, a memory 330, a communication interface 340 and a temperature regulation device 350. The processor 310, the memory 330, the communication interface 340 and the temperature regulation device 350 are connected through the bus 320.
[0051] It should be understood that, in the embodiment, the processor 310 can be a CPU, and the processor 310 can also be other general-purpose processors, digital signal processors (DSPs), (application-specific integrated circuits, ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0052] The processor 310 may also be a graphics processing unit (GPU), a neural network processing unit (NPU), a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application. In an embodiment of the present application, the processor 310 may be used to send different instructions to the memory 330. For example, the processor 310 may be used to send read instructions, write instructions, and calculation instructions to the memory 330. The read instruction may be used to read data from the memory 330, for example, to read the heat generation coefficient corresponding to at least one calculation type in the target task in the memory; the write instruction may be used to write data to the memory 330, for example, to write the heat generation coefficient corresponding to at least one calculation type into the memory; the calculation instruction may be used to instruct the memory 330 to calculate the data in the target address according to at least one calculation type. The at least one calculation type is a calculation type in the target task, and the target address is the address in the memory of the data corresponding to at least one calculation type in the target task. For example, if at least one calculation method is an accumulation calculation, the calculation instruction may be used to instruct the memory 330 to perform an accumulation calculation on the data in the target address.
[0053] The communication interface 340 is used to implement communication between the electronic device 30 and an external device or component.
[0054] The bus 320 may include a path for transmitting information between the aforementioned components (e.g., the processor 310 and the memory 330). In addition to the data bus, the bus 320 may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus 320 in the figure. The bus 320 may be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc.
[0055] As an example, the electronic device 30 may include one processor or multiple processors. The processor may be a single-core processor or a multi-core (multi-CPU) processor. The processor herein may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions).
[0056] It is worth mentioning that, Figure 3 In the embodiment, only the electronic device 30 includes one processor 310 and one memory 330, and here, the processor 310 and the memory 330 are respectively used to indicate a type of device or equipment. In specific embodiments, the number of each type of device or equipment can be determined according to business needs.
[0057] The memory 330 can be a volatile memory pool or a non-volatile memory pool, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically EPROM (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM, synchronous dynamic RAM, double data rate synchronous dynamic RAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM) and direct rambus RAM (DR RAM).
[0058] In the embodiment of the present application, the memory 330 is a memory of a PIM architecture. The memory of the PIM architecture includes a storage unit and a logic unit, the storage unit can be used to store data, for example, the data can include data corresponding to at least one type of calculation and a heat production coefficient. The logic unit can be used to calculate the data in at least one type of calculation, for example, the logic unit can include a plurality of calculation circuits, each calculation circuit is used to perform one type of calculation, for example, the logic unit includes a first calculation circuit and a second calculation circuit, the first calculation circuit is used to perform an accumulation calculation, and the second calculation circuit is used to perform a multiplication calculation.
[0059] The temperature adjusting device 350 can be configured to receive the control signal sent by the processor 310. For example, the temperature adjusting device 350 can be configured to receive a first control signal sent by the processor 310 when the processor determines that the temperature of the memory at the first time is higher than the first temperature threshold based on the calculated heat generation parameter of the memory and the current heat dissipation parameter of the memory. The first control signal can be configured to control the temperature adjusting device to adjust the temperature of the memory at a second time, which is not later than the first time. Alternatively, the temperature adjusting device 350 can be configured to receive a second control signal sent by the processor 310 when the processor determines that the temperature of the memory at the first time is lower than the second temperature threshold based on the calculated heat generation parameter of the memory and the current heat dissipation parameter of the memory. The second control signal can be configured to control the temperature adjusting device to adjust the temperature of the memory at a third time, which is not later than the first time. Optionally, the temperature adjusting device 350 can be configured to determine different temperature adjusting manners and temperature adjusting times according to different control signals, and adjust the temperature of the memory according to the different temperature adjusting manners and temperature adjusting times.
[0060] The electronic device can be an electronic device, or a system on chip (SoC) or chip set including a plurality of chips applied to the electronic device, or a module including the SoC or the chip set. The electronic device can be a terminal device or a server. Optionally, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a desktop computer, a palm computer, an ultra-mobile personal computer (umPC), a mobile internet device (MID), a netbook, a video camera, a camera, a wearable device (for example, a smart watch and a smart bracelet), a vehicle-mounted device (for example, a car, a bicycle, an electric vehicle, an airplane, a ship, a train, a high-speed rail, and the like), a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a smart home device (for example, a refrigerator, a television, an air conditioner, an electricity meter, and the like), a smart robot, a plant device, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, or a wireless terminal in a smart home, a flight device (for example, a smart robot, a hot air balloon, a drone, an airplane), and the like.
[0061] The embodiment of the present application also provides a temperature adjusting device, which can be a chip or a module. Figure 4 The temperature adjusting device provided by the embodiment of the present application can include a processor, a memory and a temperature adjusting device, which can be the processor 310, the memory 330 and the temperature adjusting device 350 shown in the above embodiment. Figure 4 The temperature adjusting device provided by the embodiment of the present application can include a processor, a memory and a temperature adjusting device, which can be the processor 310, the memory 330 and the temperature adjusting device 350 shown in the above embodiment. Figure 3 The temperature adjusting device provided by the embodiment of the present application can include a processor, a memory and a temperature adjusting device, which can be the processor 310, the memory 330 and the temperature adjusting device 350 shown in the above embodiment. Figure 3 The temperature adjusting device provided by the embodiment of the present application can include a processor, a memory and a temperature adjusting device, which can be the processor 310, the memory 330 and the temperature adjusting device 350 shown in the above embodiment. Figure 3 The temperature adjusting device provided by the embodiment of the present application can include a processor, a memory and a temperature adjusting device, which can be the processor 310, the memory 330 and the temperature adjusting device 350 shown in the above embodiment.
[0062] Figure 5 The temperature adjusting method provided by the embodiment of the present application can be applied to the processor of the electronic device shown in the above embodiment, or the processor of the temperature adjusting device shown in the above embodiment. Figure 3 The temperature adjusting method provided by the embodiment of the present application can be applied to the processor of the electronic device shown in the above embodiment, or the processor of the temperature adjusting device shown in the above embodiment. Figure 4 The temperature adjusting method provided by the embodiment of the present application can be applied to the processor of the electronic device shown in the above embodiment, or the processor of the temperature adjusting device shown in the above embodiment.
[0063] S501: The processor obtains a heat generation coefficient corresponding to at least one calculation type in a target task from the memory, and estimates a calculation heat generation parameter of the memory according to a data amount of data in a target address and the heat generation coefficient, the target address being an address of the data corresponding to the at least one calculation type in the target task in the memory.
[0064] The target task is a task that needs to be calculated at the current moment, and the target task can include multiple subtasks, each subtask corresponding to at least one calculation type, and the calculation types corresponding to each subtask being different, for example, the target task can include a first subtask and a second subtask, the calculation type corresponding to the first subtask being accumulation calculation, and the calculation type corresponding to the second subtask being multiplication calculation, for the convenience of understanding, each subtask corresponding to one calculation type is taken as an example for description.
[0065] In addition, the calculation type can include addition calculation, multiplication calculation, subtraction calculation, division calculation and other calculation modes, and the addition calculation can include accumulation calculation and the multiplication calculation can include multiplication calculation.
[0066] In addition, the at least one computing type can include one computing type, or can include multiple computing types, that is, two or more computing types. The at least one computing type can be a computing type corresponding to the target task, or can be a computing type corresponding to part of subtasks in the target task. The following describes three different embodiments.
[0067] In a first possible embodiment, the at least one computing type includes one computing type, which is a computing type corresponding to one subtask in the target task.
[0068] In a second possible embodiment, the at least one computing type includes multiple computing types, which are computing types corresponding to the target task, that is, the multiple computing types are computing types corresponding to multiple subtasks included in the target task.
[0069] In a third possible embodiment, the at least one computing type includes multiple computing types, which are computing types corresponding to part of subtasks in the target task.
[0070] In the above three possible embodiments, the logic unit in the memory performs computation on data in the target address according to the at least one computing type, the target address is a storage address of data corresponding to the at least one computing type in the memory, and the computation originally performed by the processor is performed by using the memory. This reduces data exchange between the memory and the processor, improves the performance of the processor, improves the parallelism of the computation, and improves the efficiency of the computation.
[0071] In addition, the computation heat generation parameter is used to represent heat generated by the memory in a unit of time when performing computation on data in the target address according to the at least one computing type. An exemplary computation heat generation parameter is as follows: Figure 6 A schematic diagram for estimating the computation heat generation parameter of the memory according to the data amount of data in the target address and the heat generation coefficient provided by an embodiment of the present application is as follows: Figure 6 It can be seen that the heat in the memory increases at T1, and heat is generated in the time period from T1 to T2. The heat in the memory at each moment is maintained as E1.
[0072] Since the at least one computing type can include one computing type, or can include multiple computing types, the following describes the heat generation coefficient corresponding to the at least one computing type in different cases.
[0073] In a possible implementation, when the at least one calculation type includes one calculation type, the heat generation coefficient corresponding to the at least one calculation type is the heat generation coefficient corresponding to the calculation type, such as the calculation type is an accumulation calculation, the heat generation coefficient is the heat generation coefficient corresponding to the accumulation calculation, and for another example, the calculation type is a multiplication calculation, and the heat generation coefficient is the heat generation coefficient corresponding to the multiplication calculation.
[0074] In another possible implementation, when the at least one calculation type includes multiple calculation types, the heat generation coefficient corresponding to the multiple calculation types can be the sum of the heat generation coefficients corresponding to each of the multiple calculation types, such as the multiple calculation types include an accumulation calculation and a multiplication calculation, the heat generation coefficient corresponding to the accumulation calculation is a first heat generation coefficient, the heat generation coefficient corresponding to the multiplication calculation is a second heat generation coefficient, and the heat generation coefficient corresponding to the multiple calculation types is the sum of the first heat generation coefficient and the second heat generation coefficient.
[0075] In actual application, the heat generation coefficient is determined in the process of compiling the program corresponding to the target task, and the heat generation coefficient can also be referred to as an in-memory calculation operation increment coefficient. The determination process of the heat generation coefficient is described below.
[0076] Further, the method provided by the embodiment of the present application further includes: determining, by the processor, the heat generation coefficient corresponding to the at least one calculation type when compiling the program corresponding to the target task; and storing, by the processor, the heat generation coefficient corresponding to the at least one calculation type in the memory.
[0077] Specifically, when compiling the program corresponding to the target task, the compiler in the processor determines a first program segment in the program corresponding to the target task that needs to be executed by the processor and a second program segment that needs to be executed by the memory, and determines the heat generation coefficient corresponding to each calculation type in the second program segment. The compiler sends the heat generation coefficient corresponding to each calculation type in the second program segment to the processor, the processor sends a first write instruction to the memory, the first write instruction is used to instruct the memory to write the heat generation coefficient corresponding to each calculation type in the second program segment into an address of the memory, and the memory receives the first write instruction and writes the heat generation coefficient corresponding to each calculation type in the second program segment into the address of the memory.
[0078] Optionally, the compiler can also determine the heat generation coefficient corresponding to each calculation type in each program segment in the program corresponding to the target task, and send the heat generation coefficient to the processor. The processor sends a second write instruction to the memory, and the second write instruction is used to instruct the memory to write the heat generation coefficient corresponding to each calculation type in each program segment into an address of the memory.
[0079] Further, the target address is a storage address of data corresponding to the at least one computing type in the memory, and the target address can include one address, for example, the target address includes an address D1, or the target address can include multiple addresses, for example, the target address includes addresses D1 to D200, and the embodiments of the present application do not make specific limitation.
[0080] Further, the processor estimates the computing heat generation parameter of the memory according to the data amount of the data in the target address and the heat generation coefficient, including: the processor estimates the computing amount and the computing frequency of the memory according to the data amount of the data in the target address and the heat generation coefficient; and the processor estimates the computing heat generation parameter according to the computing amount and the computing frequency.
[0081] When the at least one computing type includes multiple computing types, the processor can determine the computing heat generation parameter according to different manners, which are described below.
[0082] In a possible embodiment, the multiple computing types include a first computing type and a second computing type, the heat generation coefficient is a sum of a first heat generation coefficient corresponding to the first computing type and a second heat generation coefficient corresponding to the second computing type, the target address includes an address of data corresponding to the first computing type in the memory and an address of data corresponding to the second computing type in the memory, and the processor estimates the computing amount and the computing frequency of the memory according to the data amount of the data in the target address and the sum of the first heat generation coefficient and the second heat generation coefficient; and the processor estimates the computing heat generation parameter according to the computing amount and the computing frequency.
[0083] In a second possible embodiment, the multiple computing types include a first computing type and a second computing type, a heat generation coefficient corresponding to the first computing type is a first heat generation coefficient, a heat generation coefficient corresponding to the second computing type is a second heat generation coefficient, the target address includes a first address and a second address, the first address is an address of data corresponding to the first computing type in the memory, and the second address is an address of data corresponding to the second computing type in the memory, the processor estimates a first computing amount and a first computing frequency corresponding to the first computing type according to the first heat generation coefficient and the data amount of the data in the first address, estimates the first heat generation parameter according to the first computing amount and the first computing frequency, and estimates a second computing amount and a second computing frequency corresponding to the second computing type according to the second heat generation coefficient and the data amount of the data in the second address, estimates the second heat generation parameter according to the second computing amount and the second computing frequency, and determines the computing heat generation parameter according to a sum of the first heat generation parameter and the second heat generation parameter.
[0084] Further, the method provided by the embodiments of the present application further includes:
[0085] S502: The processor sends a computing instruction to the memory, and the computing instruction is used to instruct the memory to perform computation on data in a target address according to at least one computing type.
[0086] Specifically, the processor sends a calculation instruction to the memory, the calculation instruction including a target address and at least one calculation type. The memory receives the calculation instruction sent by the processor and performs calculation on data in the target address according to the at least one calculation type. For example, a logic unit in the memory can perform calculation on data in the target address according to the at least one calculation type. The logic unit can include a plurality of calculation circuits, each of which performs one type of calculation. For example, the logic unit can include a first calculation circuit and a second calculation circuit. The first calculation circuit can be used to perform addition calculation, and the second calculation circuit can be used to perform multiplication calculation.
[0087] S503: The processor outputs a control signal according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, the control signal being used to control the temperature of the memory when performing calculation on data in the target address according to the at least one calculation type.
[0088] The current heat dissipation parameter of the memory is related to the first temperature adjustment mode of the memory and the ambient temperature where the memory is located. The first temperature adjustment mode is the temperature adjustment mode before the memory receives the calculation instruction. The current heat dissipation parameter of the memory is used to represent the heat dissipation of the memory per unit time before the memory receives the calculation instruction. The ambient temperature is the temperature of the environment where the memory is located. For example, when the electronic device is a server, the ambient temperature refers to the temperature of the computer room where the memory is located.
[0089] In addition, the processor is further configured to be connected with a temperature adjustment device. The temperature adjustment device can include a fan temperature adjustment device, a water cooling temperature adjustment device, and other temperature adjustment devices. The embodiments of the present application do not make specific limitations on this.
[0090] In addition, the temperature adjustment mode is the temperature adjustment mode corresponding to the temperature adjustment device. The temperature adjustment mode can include at least one of the following: fan first frequency temperature adjustment, fan second frequency temperature adjustment, fan third frequency temperature adjustment, and water cooling temperature adjustment. The first frequency is less than the second frequency, and the second frequency is less than the third frequency.
[0091] Furthermore, different temperature adjustment modes have different temperature adjustment amounts, i.e., different temperature adjustment capabilities. For example, the temperature adjustment amount of water cooling temperature adjustment per unit time is greater than that of fan temperature adjustment per unit time. The temperature adjustment amount of fan third frequency temperature adjustment per unit time is greater than that of fan second frequency temperature adjustment per unit time. The temperature adjustment amount of fan second frequency temperature adjustment per unit time is greater than that of fan first frequency temperature adjustment per unit time.
[0092] In one possible embodiment, as shown in FIG. 5, step S503 includes: Figure 7
[0093] S503a: When the processor determines that the temperature of the memory at the first time is higher than the first temperature threshold according to the calculated heat generation parameter and the current heat dissipation parameter of the memory, the processor outputs a first sub-control signal, and the first sub-control signal is used to control the temperature adjusting device to adjust the temperature of the memory at a second time, and the second time is not later than the first time.
[0094] The first temperature threshold is an upper limit value of the working temperature range of the memory, for example, the working temperature range of the memory is 40 degrees to 50 degrees, and the first temperature threshold is 50 degrees.
[0095] Since the calculated heat generation parameter is used to represent the heat generated by the memory in unit time when the memory performs calculation on the data in the target address according to at least one calculation type, and the current heat dissipation parameter of the memory is used to represent the heat dissipation of the memory in unit time, the processor can determine the temperature of the memory at each time during the process of the memory performing calculation on the data in the target address according to at least one calculation type according to the calculated heat generation parameter and the current heat dissipation parameter of the memory.
[0096] In a possible embodiment, when the processor determines that the temperature of the memory at the first time is higher than the first temperature threshold, the processor selects a second temperature adjusting mode and a second time from a plurality of temperature adjusting modes according to the calculated heat generation parameter and the current heat dissipation parameter, the second time is not later than the first time, and sends first control information to the temperature adjusting device at the second time, and the first control information can be used to control the temperature adjusting device to adjust the temperature of the memory according to the second temperature adjusting mode at the second time, and the temperature adjustment amount corresponding to the second temperature adjusting mode is greater than the temperature adjustment amount corresponding to the first temperature adjusting mode. For example, before the memory receives the calculation instruction, the first temperature adjusting mode of the temperature adjusting device is fan first frequency temperature adjustment, and the first control information can be used to control the temperature adjusting device to adjust the temperature of the memory according to fan third frequency temperature adjustment at the second time, and the temperature adjustment amount corresponding to the fan third frequency temperature adjustment is greater than the temperature adjustment amount corresponding to the fan first frequency temperature adjustment.
[0097] Since the adjustment amount corresponding to different temperature adjusting modes is different, the greater the adjustment amount, the shorter the required cooling time, for example, when the temperature of the memory is adjusted according to the fan third frequency temperature adjustment at the second time, the second time can be a time 30s earlier than the first time; when the temperature of the memory is adjusted according to the water cooling temperature adjustment at the second time, the second time can be a time 5s earlier than the first time, so that different temperature adjusting modes determine the time of temperature adjustment.
[0098] In a possible embodiment, as shown in Figure 8 S503 includes:
[0099] S503b: When the processor determines that the temperature of the memory at the first moment is lower than the second temperature threshold based on the calculated heat generation parameters of the memory and the current heat dissipation parameters of the memory, the processor outputs a second sub-control signal, and the second sub-control signal is used to control the temperature control device to adjust the temperature of the memory at a third moment, and the third moment is no later than the first moment.
[0100] The second temperature threshold is the lower limit of the operating temperature range of the memory. For example, if the operating temperature range of the memory is 40 degrees to 50 degrees, the second temperature threshold is 40 degrees.
[0101] In one possible embodiment, when the processor determines that the temperature of the memory at a first moment is lower than a second temperature threshold, the processor selects a third temperature control mode and a third time from a plurality of temperature control modes based on the calculated heat generation parameter and the current heat dissipation parameter, with the third time being no later than the first time, and sends second control information to the temperature control device at the third time. The second control information can be used to control the temperature control device to adjust the temperature of the memory according to the third temperature control mode at the third time, with the temperature adjustment amount corresponding to the third temperature control mode being less than the temperature adjustment amount corresponding to the first temperature control mode. For example, before the memory receives the calculation instruction, the first temperature control mode of the temperature control device is water cooling. The second control information can be used to control the temperature control device to cool the memory according to the second fan frequency at the third time, with the temperature adjustment amount corresponding to the second fan frequency being less than the temperature adjustment amount corresponding to the water cooling.
[0102] Furthermore, the method provided in the embodiment of the present application further includes: after the memory calculates the data in the target address according to at least one calculation type, the calculation result is sent to the processor. This reduces the data exchange between the processor and the memory. For example, Figure 9 is a schematic diagram of data exchange between a memory and a processor provided in an embodiment of the present application, wherein the processor may be a CPU, a GPU, or a heterogeneous processor (extreme processing unit, XPU). The XPU is a processor composed of multiple different types of processors. The processor includes a control unit and a logic unit. The control unit can be used to send various instructions to the memory. For example, the controller can be used to send read instructions, write instructions, and calculation instructions to the memory. Figure 9 The memory in (a) includes storage units but does not include logic units. Figure 9 The memory in (b) is a PIM architecture memory, which includes a logic unit and a storage unit, such as Figure 9 As shown in (a) of FIG, when the processor calculates the data in the target address according to at least one calculation type, there is a large amount of data exchange between the processor and the memory, such as Figure 9As shown in (b) of the figure, when the logic unit in the memory performs calculation on the data in the target address according to at least one calculation type, only the calculation result and the calculation instruction are transmitted between the processor and the memory, and the data exchanged between the memory and the processor is reduced.
[0103] Optionally, for the memory of the PIM architecture, each storage unit can correspond to one logic unit, or multiple storage units correspond to one logic unit, and the embodiments of the present application do not make specific limitation.
[0104] For the convenience of understanding, the temperature adjusting method provided by the embodiments of the present application is described below by taking Figure 10 as an example.
[0105] S101: The processor detects the state of the memory.
[0106] S102: The processor determines whether the memory performs calculation. If the memory does not perform calculation (i.e. no), S103 is executed; if the memory performs calculation (i.e. yes), S103 is executed.
[0107] S103: The current heat dissipation parameter of the memory is determined.
[0108] S104: It is judged whether the temperature of the memory is within the preset temperature range. If the temperature of the memory is within the preset temperature range (i.e. yes), S105 is executed; if the temperature of the memory is not within the preset temperature range (i.e. no), S106 is executed.
[0109] The preset temperature range is the temperature range in which the memory works, for example, the preset temperature range can be 40 degrees to 50 degrees.
[0110] S105: The processor outputs a control signal for maintaining the current temperature adjusting mode to the temperature adjusting device.
[0111] S106: The processor outputs a control signal for changing the current temperature adjusting mode to the temperature adjusting device according to the temperature of the memory and the current heat dissipation parameter.
[0112] If the memory performs calculation, the processor executes S107 after executing S103.
[0113] S107: The processor obtains the heat generation coefficient corresponding to at least one calculation type in the target task from the memory, and estimates the calculation heat generation parameter of the memory according to the data amount of the data in the target address and the heat generation coefficient.
[0114] S108: The processor outputs a control signal according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, and the control signal is used to control the temperature when the memory performs calculation on the data in the target address according to at least one calculation type.
[0115] The temperature adjusting method provided in the embodiments of the present application, before the processor sends a calculation instruction to the memory, the processor obtains a heat generation coefficient corresponding to at least one calculation type in a target task from the memory, and estimates a calculation heat generation parameter of the memory according to a data amount of data in a target address and the heat generation coefficient, wherein the heat generation coefficient is a heat generation coefficient corresponding to at least one calculation type, and each calculation type corresponds to a heat generation coefficient. The calculation heat generation parameter of the memory in the calculation process is estimated according to the heat generation coefficient and the data amount of data in the target address, that is, the actual heat generated by the memory in the calculation process is determined, the accuracy of the calculation heat generation parameter is improved, the temperature of the memory is controlled according to the calculation heat generation parameter and a current heat dissipation parameter of the memory, and the accuracy of the temperature adjustment is improved. On the other hand, the calculation heat generation parameter is determined before the memory receives the calculation instruction, and in the process of calculating the data in the target address according to the at least one calculation type, the processor can control the temperature of the memory according to the calculation heat generation parameter and the current heat dissipation parameter of the memory, that is, the temperature of the memory can be controlled in real time without the historical temperature of the memory, and the timeliness is improved.
[0116] The embodiments of the present application also provide a temperature adjusting device. As shown in the example of Figure 11 The temperature adjusting device can include an obtaining unit 110, an estimating unit 111 and a sending unit 112. The obtaining unit 110 and the estimating unit 111 can be used to perform S501 in the above method embodiments and / or other steps described herein. The sending unit 112 is used to perform S502 and S503 (including S503a and S503b) in the above method embodiments and / or other steps described herein.
[0117] Optionally, the temperature adjusting device can further include a compiling unit 113, which can be used to determine the heat generation coefficient corresponding to at least one calculation type when compiling a program corresponding to a target task.
[0118] It can be understood that all related contents of the steps involved in the above method embodiments can be cited into the embodiments of the business processing device, which will not be described here in detail.
[0119] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0120] The units described as separate components may or may not be physically separate, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or also may be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0121] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a readable storage medium, which can include a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various storage medium that can store program codes. Based on such understanding, the technical scheme of the embodiment of the present application essentially or the part that contributes to the prior art or the whole or part of the technical scheme can be embodied in the form of a software product.
[0122] In another embodiment of the present application, a temperature adjustment device is also provided, which includes a memory and a processor. The memory can be a PIM architecture memory, and the processor in the temperature adjustment device can be used to execute the steps in the above method embodiments. The temperature adjustment device can be the temperature adjustment device shown in Figure 4 .
[0123] In another embodiment of the present application, an electronic device is also provided, which includes a memory, a processor and a temperature adjustment device. The electronic device can be the electronic device shown in Figure 3 . For the description of the electronic device, please refer to Figure 3 , which will not be repeated here.
[0124] In another embodiment of the present application, a readable storage medium is also provided, which stores computer execution instructions. When a temperature adjustment device runs the computer execution instructions, the temperature adjustment device executes the steps in the above method embodiments.
[0125] In yet another embodiment of the present application, a computer program product is also provided, which includes computer instructions stored in a readable storage medium. At least one processor of a device can read the computer instructions from the readable storage medium, and the at least one processor executes the computer instructions to make the device execute the steps in the above method embodiments.
[0126] Finally, it should be noted that: the above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A temperature adjustment method, characterized by, The method is applied to a temperature adjusting device, the temperature adjusting device comprises a processor connected with a memory, and the method comprises the following steps: The processor obtains a heat generation coefficient corresponding to at least one calculation type in a target task from the memory, and estimates a calculation heat generation parameter of the memory according to a data amount of data in a target address and the heat generation coefficient, the target address being an address of data corresponding to the at least one calculation type in the target task in the memory; The processor sends a calculation instruction to the memory, the calculation instruction being used for instructing the memory to calculate the data in the target address according to the at least one calculation type; The processor outputs a control signal according to the calculation heat generation parameter of the memory and a current heat dissipation parameter of the memory, the control signal being used for controlling a temperature of the memory when the memory calculates the data in the target address according to the at least one calculation type.
2. The method of claim 1, wherein, The method further comprises the following steps: The processor determines the heat generation coefficient corresponding to the at least one calculation type when compiling a program corresponding to the target task; The processor stores the heat generation coefficient corresponding to the at least one calculation type in the memory.
3. The method according to claim 1 or 2, characterized in that, The current heat dissipation parameter of the memory is related to a first temperature adjusting mode of the memory and an ambient temperature where the memory is located, the first temperature adjusting mode being a temperature adjusting mode before the memory receives the calculation instruction.
4. The method according to any one of claims 1 to 3, characterized in that, The processor estimates the calculation heat generation parameter of the memory according to the data amount of the data in the target address and the heat generation coefficient, comprising the following steps: The processor estimates a calculation amount and a calculation frequency of the memory according to the data amount of the data in the target address and the heat generation coefficient; The processor estimates the calculation heat generation parameter according to the calculation amount and the calculation frequency.
5. The method according to any one of claims 1 to 4, characterized in that, The processor is further connected with a temperature adjusting device, and the processor outputs the control signal according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, comprising the following steps: When the processor determines that a temperature of the memory at a first time is higher than a first temperature threshold value according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, the processor outputs a first control signal, the first control signal being used for controlling the temperature adjusting device to adjust the temperature of the memory at a second time, the second time not being later than the first time; Or, when the processor determines that the temperature of the memory at the first time is lower than a second temperature threshold value according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, the processor outputs a second control signal, the second control signal being used for controlling the temperature adjusting device to adjust the temperature of the memory at a third time, the third time not being later than the first time.
6. The method of claim 5, wherein, The first control signal is used for controlling the temperature adjusting device to adjust the temperature of the memory according to a second temperature adjusting mode at the second time, a temperature adjusting amount corresponding to the second temperature adjusting mode being greater than a temperature adjusting amount corresponding to a first temperature adjusting mode, the first temperature adjusting mode being a temperature adjusting mode before the memory receives the calculation instruction; Alternatively, the second control signal is used to control the temperature adjusting device to adjust the temperature of the memory at a third time according to a third temperature adjusting mode, and the temperature adjusting amount corresponding to the third temperature adjusting mode is less than the temperature adjusting amount corresponding to the first temperature adjusting mode.
7. The method of claim 6, wherein, The method further comprises: The processor selects the second temperature adjusting mode and the second time from a plurality of temperature adjusting modes according to the calculated heat generation parameter and the current heat dissipation parameter of the memory; Alternatively, the processor selects the third temperature adjusting mode and the third time from a plurality of temperature adjusting modes according to the calculated heat generation parameter and the current heat dissipation parameter of the memory.
8. The method according to any one of claims 5-7, characterized in that, The temperature adjusting device comprises a water cooling temperature adjusting device and a fan temperature adjusting device, and the temperature adjusting mode comprises at least one of the following: fan first frequency temperature adjusting, fan second frequency temperature adjusting, fan third frequency temperature adjusting, and water cooling temperature adjusting, wherein the first frequency is less than the second frequency, and the second frequency is less than the third frequency.
9. A temperature regulating device, characterized by, The temperature adjusting device is connected with the memory, and the temperature adjusting device comprises: An acquisition unit is configured to acquire, from the memory, a heat generation coefficient corresponding to at least one calculation type in a target task; An estimation unit is configured to estimate a calculation heat generation parameter of the memory according to a data amount of data in a target address and the heat generation coefficient, the target address being an address of data corresponding to the at least one calculation type in the target task in the memory; A sending unit is configured to send a calculation instruction to the memory, the calculation instruction being used to instruct the memory to calculate the data in the target address according to the at least one calculation type. The sending unit is further configured to output a control signal according to the calculation heat generation parameter of the memory and a current heat dissipation parameter of the memory, the control signal being used to control a temperature of the memory when the memory calculates the data in the target address according to the at least one calculation type.
10. The apparatus of claim 9, wherein, The temperature adjusting device further comprises a compiling unit. The compiling unit is configured to determine the heat generation coefficient corresponding to the at least one calculation type when compiling a program corresponding to the target task. The sending unit is configured to store the heat generation coefficient corresponding to the at least one calculation type in the memory.
11. The apparatus of claim 9 or 10, wherein, The current heat dissipation parameter of the memory is related to a first temperature adjusting mode of the memory and an ambient temperature in which the memory is located, the first temperature adjusting mode being a temperature adjusting mode before the memory receives the calculation instruction.
12. The apparatus of any one of claims 9-11, wherein, The estimation unit is further configured to: estimate a calculation amount and a calculation frequency of the memory according to the data amount of the data in the target address and the heat generation coefficient; and estimate the calculation heat generation parameter according to the calculation amount and the calculation frequency.
13. The device of any of claims 9-12, wherein, The temperature adjusting device is connected with the temperature adjusting device, and the sending unit is further configured to: output a first control signal when the estimation unit determines that a temperature of the memory at a first time is higher than a first temperature threshold according to the calculation heat generation parameter of the memory and the current heat dissipation parameter of the memory, the first control signal being used to control the temperature adjusting device to adjust the temperature of the memory at a second time, the second time being not later than the first time. Alternatively, when the estimation unit determines that the temperature of the memory at the first time is lower than the second temperature threshold according to the calculated heat generation parameter of the memory and the current heat dissipation parameter of the memory, a second control signal is output, the second control signal being used to control the temperature adjusting device to adjust the temperature of the memory at a third time, the third time being not later than the first time.
14. The apparatus of claim 13, wherein, The first control signal is used to control the temperature adjusting device to adjust the temperature of the memory at a second time according to a second temperature adjusting mode, the temperature adjustment amount corresponding to the second temperature adjusting mode being greater than the temperature adjustment amount corresponding to a first temperature adjusting mode, the first temperature adjusting mode being a temperature adjusting mode before the memory receives the calculation instruction. Alternatively, the second control signal is used to control the temperature adjusting device to adjust the temperature of the memory at a third time according to a third temperature adjusting mode, the temperature adjustment amount corresponding to the third temperature adjusting mode being less than the temperature adjustment amount corresponding to the first temperature adjusting mode.
15. The apparatus of claim 14, wherein, The temperature adjusting device further comprises a determination unit, the determination unit being used to: select the second temperature adjusting mode and the second time from a plurality of temperature adjusting modes according to the calculated heat generation parameter of the memory and the current heat dissipation parameter of the memory; or select the third temperature adjusting mode and the third time from a plurality of temperature adjusting modes according to the calculated heat generation parameter of the memory and the current heat dissipation parameter of the memory.
16. The apparatus of any one of claims 13-15, wherein, The temperature adjusting device comprises a water cooling temperature adjusting device and a fan temperature adjusting device, and the temperature adjusting mode comprises at least one of the following: fan first frequency temperature adjusting, fan second frequency temperature adjusting, fan third frequency temperature adjusting, and water cooling temperature adjusting, the first frequency being less than the second frequency, and the second frequency being less than the third frequency.
17. A temperature regulating device, characterized by The temperature adjusting device comprises a processor and a memory, the processor being used to execute the temperature adjusting method according to any one of claims 1-8 to adjust the temperature in the memory.
18. An electronic device, comprising: The electronic device comprises a processor, a memory, and a temperature adjusting device, the processor being used to execute the temperature adjusting method according to any one of claims 1-8, and the processor is further used to output a control signal to the temperature adjusting device, the temperature adjusting device adjusting the temperature in the memory according to the control signal.
19. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, when the computer instructions run on a temperature adjusting device, the temperature adjusting device executes the temperature adjusting method according to any one of claims 1-8.
20. A computer program product comprising instructions, characterized in that, The computer program product makes the temperature adjusting device execute the temperature adjusting method according to any one of claims 1-8 when the computer program product runs on the temperature adjusting device.