CN115358915A - Video memory data processing method and device, electronic equipment and storage medium - Google Patents

Video memory data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115358915A
CN115358915A CN202210993354.5A CN202210993354A CN115358915A CN 115358915 A CN115358915 A CN 115358915A CN 202210993354 A CN202210993354 A CN 202210993354A CN 115358915 A CN115358915 A CN 115358915A
Authority
CN
China
Prior art keywords
video memory
display
memory
statistical chart
block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202210993354.5A
Other languages
Chinese (zh)
Inventor
吴珂馨
杨冠姝
李丹阳
石明康
张行程
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sensetime Technology Development Co Ltd
Original Assignee
Shanghai Sensetime Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sensetime Technology Development Co Ltd filed Critical Shanghai Sensetime Technology Development Co Ltd
Priority to CN202210993354.5A priority Critical patent/CN115358915A/en
Publication of CN115358915A publication Critical patent/CN115358915A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure provides a method and an apparatus for processing video memory data, an electronic device and a storage medium, wherein the method comprises: acquiring video memory state data of a target terminal in a model training process; determining the service condition of each display memory block of the target terminal in the process of training a model based on the display memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block; and generating and displaying a first statistical chart for representing the distribution condition of the display fragments of the target terminal based on the use condition of the display block.

Description

Video memory data processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for processing video memory data, an electronic device, and a storage medium.
Background
The video memory refers to a memory of a Graphics Processing Unit (GPU), and is mainly used for storing parameters of the model itself and an activation value generated in a calculation process in a training process of the machine model. In the storage process, a display memory block needs to be divided from the display memory, the divided display memory block is allocated to data needing to be stored, and along with the continuous increase of the data quantity and the model structure of the machine model, more and more data needing to be stored in the display memory result in the limited display memory capacity of the storage space being nervous, and errors of insufficient display memory easily occur in the training process.
In order to store more data under the condition of limited video memory capacity, the method can be realized by reducing video memory fragments in the video memory, and in order to reduce the video memory fragments, the distribution condition of the video memory fragments needs to be known, but the distribution condition of the video memory fragments is usually indirectly reflected by some video memory data and cannot be intuitively displayed.
Disclosure of Invention
The embodiment of the disclosure at least provides a video memory data processing method and device, electronic equipment and a storage medium.
In a first aspect, an embodiment of the present disclosure provides a method for processing video memory data, including:
acquiring video memory state data of a target terminal in a model training process;
determining the use condition of each display and memory block of the target terminal in the process of training a model based on the display and memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block;
and generating and displaying a first statistical chart for representing the distribution condition of the display fragments of the target terminal based on the use condition of the display block.
Based on the method, the using condition of each display and memory block is determined based on the display and memory state data in the process of training the model, and a first statistical chart is generated based on the using condition of the display and memory blocks, so that the visualization of the distribution condition of the display and memory fragments is realized; in this way, the use condition of each display block can be converted into the distribution condition of the display fragment of the target terminal, and the display condition is displayed, so that the user can conveniently check the display fragment.
In an alternative embodiment, the first statistical chart is generated by:
classifying the display and memory blocks based on actually used display memory corresponding to each display and memory block and a first ratio between the display and memory capacity of the display and memory blocks to obtain a plurality of groups of display and memory block sets;
generating statistical information of each group of video memory block sets based on the first ratio corresponding to each group of video memory block sets and the total number of video memory blocks in the video memory block sets;
and generating the first statistical chart based on the statistical information of the video memory block sets.
In the embodiment, the video memory fragments are represented by the first ratio between the actually used video memory and the video memory capacity of each video memory block in the video memory block set, the occurrence frequency of the video memory fragments is represented by the total number of the video memory blocks in the video memory block set, and the statistical information of each group of video memory block set is generated by the first ratio and the total number of the video memory blocks corresponding to the first ratio, so that the use condition of the video memory blocks is used for representing the distribution condition of the video memory fragments.
In an optional embodiment, the method further comprises:
in response to a triggering operation of a first sorting button corresponding to the first statistical chart, determining first target data corresponding to the first sorting button; the first target data comprises a first ratio corresponding to the display and storage block set and the total number of the display and storage blocks corresponding to the display and storage block set;
and sequencing the first target data according to a sequencing rule corresponding to the first sequencing button, and updating the sequencing order of the statistical information of each video memory block set in the first statistical chart based on the sequencing result of the first target data.
In this embodiment, the data arrangement order in the first statistical chart can be changed by using the deployed first ordering button, so that the display mode of the first statistical chart is more in line with the requirements of the user, and the user can read the first statistical chart conveniently.
In an optional embodiment, the method further comprises:
determining the number of video memory fragments in each video memory block set based on the first statistical chart;
determining the quantity of the video memory fragments corresponding to each video memory capacity based on the quantity of the video memory fragments of each video memory block set and the video memory capacity corresponding to the video memory block set;
and generating and displaying a second statistical chart based on the number of the video memory fragments corresponding to each video memory capacity.
In this embodiment, the number of the video memory fragments existing in each video memory block set is determined through the first statistical chart, and then the number of the video memory fragments corresponding to each video memory block set can be determined based on the determined number of the video memory fragments and the video memory capacity corresponding to each video memory block set, and the generated second statistical chart can show the number of the video memory fragments under each video memory block from the perspective of the video memory capacity of the video memory blocks, so that a user can analyze the distribution of the video memory fragments from the perspective of the video memory capacity.
In an optional embodiment, the method further comprises:
responding to the triggering operation of a second sorting button corresponding to the second statistical chart, and determining second target data corresponding to the second sorting button; the second target data comprises the video memory capacity and the quantity of video memory fragments corresponding to the video memory capacity;
and sequencing the second target data according to a sequencing rule corresponding to the second sequencing button, and updating the arrangement sequence of the quantity of the display memory fragments corresponding to each display memory capacity in the second statistical chart based on the sequencing result of the second target data.
According to the embodiment, the data arrangement sequence in the second statistical chart can be changed by using the deployed second sorting button, so that the display mode of the second statistical chart is more in line with the requirements of users, and the users can read the second statistical chart conveniently.
In an optional embodiment, the method further comprises:
determining the calling times of a plurality of video memory allocation interfaces of the target terminal based on the video memory state data;
and generating and displaying a third statistical chart of the calling condition of the video memory allocation interface based on the calling times of the video memory allocation interface.
According to the embodiment, the calling times of the multiple video memory allocation interfaces can be determined through the video memory state data, the video memory allocation interfaces are visualized, the third statistical chart is generated, a user can conveniently check the calling conditions of the video memory allocation interfaces, and therefore the video memory allocation strategy is analyzed and adjusted.
In an optional embodiment, the method further comprises:
and adjusting the video memory allocation strategy of the target terminal in the process of training the model based on the first statistical chart, the second statistical chart and the third statistical chart.
In this embodiment, the first statistical chart, the second statistical chart, and the third statistical chart may reflect the distribution of the video memory fragments, the size of the video memory fragments, and the video memory allocation process, and the video memory allocation policy may be adjusted according to information reflected by the charts, so that the video memory fragments are reduced and more data are stored in a case where the storage space of the video memory is constant.
In an optional implementation manner, the video memory status data includes a call record of a plurality of video memory allocation interfaces corresponding to the target terminal.
In a second aspect, an embodiment of the present disclosure further provides a video memory data processing apparatus, including:
the acquisition module is used for acquiring video memory state data of the target terminal in the process of training the model;
the analysis module is used for determining the service condition of each display memory block of the target terminal in the process of training a model based on the display memory state data; the service condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actually used display and storage of the display and storage block;
and the visualization module is used for generating and displaying a first statistical chart for representing the display fragment distribution condition of the target terminal based on the use condition of the display block.
In an alternative embodiment, the visualization module generates the first statistical chart by performing the following steps:
classifying the display and memory blocks based on actually used display memory corresponding to each display and memory block and a first ratio between the display and memory capacity of the display and memory blocks to obtain a plurality of groups of display and memory block sets;
generating statistical information of each group of video memory block sets based on a first ratio corresponding to each group of video memory block sets and the total number of video memory blocks in the video memory block sets;
and generating the first statistical chart based on the statistical information of the video memory block sets.
In an optional embodiment, the visualization module is further configured to:
in response to a triggering operation of a first sorting button corresponding to the first statistical chart, determining first target data corresponding to the first sorting button; the first target data comprises a first ratio corresponding to the display and storage block set and the total number of the display and storage blocks corresponding to the display and storage block set;
and sequencing the first target data according to a sequencing rule corresponding to the first sequencing button, and updating the sequencing order of the statistical information of each video memory block set in the first statistical chart based on the sequencing result of the first target data.
In an alternative embodiment, the visualization module is further configured to:
determining the number of video memory fragments in each video memory block set based on the first statistical chart;
determining the quantity of the video memory fragments corresponding to each video memory capacity based on the quantity of the video memory fragments of each video memory block set and the video memory capacity corresponding to the video memory block set;
and generating and displaying a second statistical chart based on the number of the video memory fragments corresponding to each video memory capacity.
In an alternative embodiment, the visualization module is further configured to:
responding to a trigger operation of a second sorting button corresponding to the second statistical chart, and determining second target data corresponding to the second sorting button; the second target data comprises the video memory capacity and the quantity of video memory fragments corresponding to the video memory capacity;
and sequencing the second target data according to a sequencing rule corresponding to the second sequencing button, and updating the arrangement sequence of the quantity of the display memory fragments corresponding to each display memory capacity in the second statistical chart based on the sequencing result of the second target data.
In an optional embodiment, the visualization module is further configured to:
determining the calling times of a plurality of video memory allocation interfaces of the target terminal based on the video memory state data;
and generating and displaying a third statistical chart of the calling condition of the video memory allocation interface based on the calling times of the video memory allocation interface.
In an optional embodiment, the apparatus further comprises an adjusting module, configured to:
and adjusting the video memory allocation strategy of the target terminal in the process of training the model based on the first statistical chart, the second statistical chart and the third statistical chart.
In an optional implementation manner, the video memory status data includes call records of a plurality of video memory allocation interfaces corresponding to the target terminal.
In a third aspect, this disclosure also provides an electronic device, a processor, and a memory, where the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions are executed by the processor to perform the steps in the first aspect or any one of the possible implementations of the first aspect.
In a fourth aspect, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.
For the description of the effects of the video memory data processing apparatus, the electronic device, and the computer readable storage medium, reference is made to the description of the video memory data processing method, which is not repeated herein.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 shows a flowchart of a video memory data processing method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a schematic diagram of a first statistical chart provided by embodiments of the present disclosure;
FIG. 3 illustrates a schematic diagram of a second statistical chart provided by embodiments of the present disclosure;
FIG. 4 is a schematic diagram illustrating a third statistical chart provided by embodiments of the present disclosure;
fig. 5 is a schematic diagram illustrating a video memory data processing apparatus according to an embodiment of the present disclosure;
fig. 6 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of embodiments of the present disclosure, as generally described and illustrated herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
In a machine model training scenario, a video memory of a terminal is mainly used for storing parameters of a model and activation values (i.e., related parameters calculated by an activation function) generated in a calculation process, before storing the data, the video memory needs to be divided into a video memory block, and then the data is stored in the video memory block, wherein the size of the video memory block is usually determined according to a video memory allocation strategy, and the video memory allocation strategy is usually determined according to the type or the label of the data. Under the actual video memory usage scene, the video memory capacity of the video memory block allocated to a group of data is usually greater than the storage space actually occupied by the group of data, at the moment, the video memory allocated but not used can not be used by other threads or data, and then becomes video memory fragments, which causes the waste of the video memory and leads to insufficient video memory, thereby enabling the abnormal operation of models with relatively large data volume and model structure, needing to adjust and optimize the video memory allocation strategy, and reducing the quantity and size of the video memory fragments. If the video memory allocation strategy is to be optimized, the current distribution situation of the video memory fragments needs to be known, but the distribution situation of the video memory fragments is usually indirectly reflected by some video memory data and cannot be intuitively displayed.
Based on the research, the present disclosure provides a video memory data processing method, which determines the use condition of each video memory block based on video memory state data in a model training process, and generates a first statistical chart based on the use condition of the video memory block, thereby realizing visualization of the distribution condition of video memory fragments; in this way, the use condition of each display block can be converted into the distribution condition of the display fragment of the target terminal, and the display condition is displayed, so that the user can conveniently check the display fragment.
The above drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above problems and the solutions proposed by the present disclosure in the following description should be the contribution of the inventor to the present disclosure in the course of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
To facilitate understanding of this embodiment, first, a video memory data analysis method disclosed in an embodiment of the present disclosure is described in detail, where an execution subject of the video memory data analysis method provided in the embodiment of the present disclosure is generally a computer device with certain computing capability, and the computer device includes, for example: a terminal device or a server or other processing device. In some possible implementations, the video memory data analysis method may be implemented by a processor calling computer readable instructions stored in a memory.
The video memory data analysis method provided by the embodiment of the present disclosure is described below by taking an execution subject as a terminal device as an example.
Referring to fig. 1, a flowchart of a video memory data analysis method provided in the embodiment of the present disclosure is shown, where the method includes steps S101 to S103, where:
s101, video memory state data of the target terminal in the model training process are obtained.
The target terminal may be a computer device that performs a training step, and the video memory status data may be video memory related data recorded in one or more training periods.
The video memory status data may include call records of multiple Application Programming Interfaces (APIs) that record video memories, where the APIs may include interfaces for video memory allocation, such as splitting a video memory, obtaining a new video memory, and marking a function; the recorded content may be determined according to specific requirements, for example, the video memory status data may include a name of a current API, an actually used video memory of a video memory block corresponding to the API, and specific conditions of an input and output video memory block of the API, where the specific conditions of the input and output video memory block may include information such as whether the video memory block is occupied, address information of the video memory block, a base address of storage information of the video memory block, a current timestamp, an address of a previous video memory block and/or a next video memory block of the video memory block, a size of the video memory block, and a doubly linked list to which the video memory block belongs.
The video memory state data can also record identification information corresponding to the target terminal, so that the video memory state data can be used for distinguishing different training terminals.
In the call record, the name of the API may be in a string format, the actually used video memory of the video memory block corresponding to the API may be in a non-negative integer format, the specific condition formats of the input and output video memory blocks of the API may also be in an array format, each element in the array may be a video memory use condition of each feature map, each feature map may correspond to an input or output video memory block of the API, that is, the element is the state data of the video memory block.
It is to be understood that, in the scenario of the above embodiment, the video memory status data includes status data of the video memory blocks input and output by each API in units of APIs, and in other scenarios, the video memory status data may be presented in other manners, which is not limited herein.
S102, determining the use condition of each display and memory block of the target terminal in the process of training a model based on the display and memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actually used display and storage of the display and storage block.
In this step, the display memory state data may be read, and the display memory state data may be analyzed, for example, the call records of each API may be read from the display memory state data, the use conditions of the display memory blocks input and output by each API may be read from the call records, and the display memory capacity of the display memory blocks and the actually used display memory of the display memory blocks may be determined.
The video memory capacity of the video memory block may be the size of the storage space allocated by the API to the video memory block when the API generates the video memory block, and the actually used video memory of the video memory block may be the size of the storage space in the video memory block, where the data is actually stored in the video memory block.
S103, generating and displaying a first statistical chart for representing the display fragment distribution condition of the target terminal based on the use condition of the display block.
After the use condition of the display block is obtained, a first statistical chart can be generated by using the use condition of the display block, the first statistical chart can include a plurality of first ratios and occurrence times corresponding to the first ratios, the first ratios can be ratios between actually used display memories of the display block and display memory capacity, the first ratios can represent whether the memory block has display fragments and sizes of the display fragments, the occurrence times corresponding to the first ratios can represent the occurrence times of the display fragments corresponding to the first ratios, and the distribution condition of the display fragments of the target terminal can be represented by combining the first ratios and the occurrence times corresponding to the first ratios.
Referring to fig. 2, a first statistical chart provided for the embodiment of the present disclosure is shown in fig. 2, where each group of data includes a first ratio and a number of occurrences corresponding to the first ratio, where the first ratio with the largest number of occurrences is 8/512, the number of occurrences is 282, the first ratio with the second largest number of occurrences is 4/512, and the number of occurrences is 211, which indicates that current memory fragments are mainly concentrated in a memory block actually occupying 4 and 8, and a video memory allocation policy for data stored in the memory block is not reasonable, so that a large amount of remaining video memories in the memory block cannot be used, and a video memory allocation policy for the data should be adjusted.
Illustratively, the first statistical chart may be generated by:
classifying the display and memory blocks based on actually used display memory corresponding to each display and memory block and a first ratio between the display and memory capacity of the display and memory blocks to obtain a plurality of groups of display and memory block sets;
generating statistical information of each group of video memory block sets based on the first ratio corresponding to each group of video memory block sets and the total number of video memory blocks in the video memory block sets;
and generating the first statistical chart based on the statistical information of the video memory block sets.
In the above step, a first ratio between actually used video memories and video memory capacities corresponding to the video memory blocks may be determined, then the video memory blocks with the same first ratio are divided into the same class to obtain a plurality of groups of video memory block sets, the first ratios of the video memory blocks in a group of video memory block sets are the same, then the total number of the video memory blocks in each group of video memory block sets may be determined, the total number of the video memory blocks is the number of occurrences of the corresponding first ratio, then the first ratio and the total number of the video memory blocks corresponding to each group of video memory block sets may be used as statistical information of the group of video memory block sets, and then the statistical information corresponding to each group of video memory block sets is arranged according to a preset sequence to obtain a visual first statistical chart, which is displayed to a user.
In this way, the display memory fragments are represented by the first ratio between the actually used display memory and the display memory capacity of each display memory block in the display memory block set, the occurrence frequency of the display memory fragments is represented by the total number of the display memory blocks in the display memory block set, and the statistical information of each group of display memory block set is generated by the first ratio and the total number of the display memory blocks corresponding to the first ratio, so that the distribution condition of the display memory fragments is represented by the use condition of the display memory blocks.
After the first statistical chart is obtained, a user can perform trigger operation on a first sorting button corresponding to the first statistical chart, so that the sorting order of the statistical information of each video memory block set displayed in the first statistical chart is changed.
For example, first target data corresponding to a first ordering button may be determined, where the first target data may include a first ratio corresponding to a video memory block set and a total number of video memory blocks corresponding to the video memory block set, and then the first target data may be ordered according to an ordering rule corresponding to the first ordering button, for example, if the first target data is the total number of video memory blocks, the video memory block sets may be ordered according to the total number of video memory blocks to obtain an ordering order corresponding to the total number of video memory blocks, and then statistical information of each video memory block set in the first statistical chart may be reordered based on an ordering result of the first target data, so as to update an ordering order of the statistical information in the first statistical chart.
The first sorting buttons may be deployed in the user interface in a plurality, and are respectively provided with corresponding first target data and sorting rules, where the sorting rules may include rules of forward sorting, reverse sorting, character sorting, and the like.
Therefore, the data arrangement sequence in the first statistical chart can be changed by using the deployed first ordering button, so that the display mode of the first statistical chart is more in line with the requirements of users, and the users can read the data conveniently.
In addition to the first statistical chart capable of characterizing the distribution of the video memory fragments, the embodiment of the present disclosure may further generate a second statistical chart representing the distribution of the video memory fragments from the viewpoint of the video memory capacity, and specifically may include the following steps:
determining the number of video memory fragments in each video memory block set based on the first statistical chart;
determining the quantity of the video memory fragments corresponding to each video memory capacity based on the quantity of the video memory fragments of each video memory block set and the video memory capacity corresponding to the video memory block set;
and generating and displaying a second statistical chart based on the number of the video memory fragments corresponding to each video memory capacity.
In this step, according to each first ratio indicated in the first statistical chart, it may be determined whether there is a video memory fragment in the video memory block corresponding to the first ratio, for example, if a difference between actually used video memory and video memory capacity in a first ratio is greater than a preset threshold, it may be determined that there is a video memory fragment in the video memory block corresponding to the first ratio, and the total number of video memory blocks corresponding to the first ratio indicates the total number of video memory fragments in the video memory block set corresponding to the first ratio.
Referring to fig. 3, which is a schematic diagram of a second statistical chart provided in the embodiment of the present disclosure, fig. 3 shows a plurality of groups of data, where each group of data is the number of video memory fragments corresponding to each video memory capacity. As shown in fig. 3, 1028 video memory fragments exist in the video memory block with a video memory capacity of 512, 106 video memory fragments exist in the video memory block with a video memory capacity of 1024, and the number of video memory fragments existing in the video memory blocks with other video memory capacities is significantly small, which can indicate that there is a problem in allocating 512 and 1024 video memories in the video memory allocation policy, and can be adjusted according to the video memory allocation policy of the part.
Therefore, the quantity of the video memory fragments existing in each video memory block set is determined through the first statistical chart, then the quantity of the video memory fragments corresponding to each video memory capacity can be determined based on the determined quantity of the video memory fragments and the video memory capacity corresponding to each video memory block set, the quantity of the video memory fragments under each video memory capacity can be displayed through the generated second statistical chart from the perspective of the video memory capacity of the video memory blocks, and a user can analyze the distribution of the video memory fragments from the perspective of the video memory capacity.
Correspondingly, the user can also perform trigger operation on a second sorting button corresponding to the second statistical chart, so as to change the arrangement sequence of the number of the video memory fragments corresponding to each video memory capacity displayed in the second statistical chart.
For example, the second target data corresponding to the second sorting button may be determined in response to a triggering operation for the second sorting button corresponding to the second statistical graph; the second target data comprises the video memory capacity and the quantity of video memory fragments corresponding to the video memory capacity; and sequencing the second target data according to a sequencing rule corresponding to the second sequencing button, and updating the arrangement sequence of the quantity of the display memory fragments corresponding to each display memory capacity in the second statistical chart based on the sequencing result of the second target data.
Furthermore, according to the video memory state data, the calling times of all the APIs (namely, the video memory allocation interfaces) can be further determined, the calling times of the video memory allocation interfaces reflect the video memory allocation situation to a certain extent, and a third statistical chart of the calling situations of the video memory allocation interfaces can be generated based on the calling times of the video memory allocation interfaces.
Referring to fig. 4, which is a schematic diagram of a third statistical chart provided in the embodiment of the present disclosure, in fig. 4, the call times of three video memory allocation interfaces are included, where the three video memory allocation interfaces are a Split interface for splitting a video memory block and an Extend interface for acquiring a new video memory from a system of a target terminal, respectively, where the call times of the Split interface are 205 times at most.
The first statistical chart, the second statistical chart and the third statistical chart can reflect the distribution of the video memory fragments, the size of the video memory fragments and the video memory distribution process, so that after the first statistical chart, the second statistical chart and the third statistical chart are obtained, the video memory distribution strategy can be adjusted through the information reflected by the charts, and therefore the video memory fragments are reduced and more data are stored under the condition that the storage space of the video memory is constant.
The video memory data processing method provided by the embodiment of the disclosure acquires video memory state data of a target terminal in a model training process; determining the use condition of each display and memory block of the target terminal in the process of training a model based on the display and memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block; and generating and displaying a first statistical chart for representing the distribution condition of the display memory fragments of the target terminal based on the use condition of the display memory block. The method and the device for processing the video memory fragments determine the use condition of each video memory block based on video memory state data in a training model process, and generate a first statistical chart based on the use condition of the video memory block, so that the visualization of the distribution condition of the video memory fragments is realized; in this way, the use condition of each display block can be converted into the distribution condition of the display fragment of the target terminal, and the display condition is displayed, so that the user can conveniently check the display fragment.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, a video memory data processing apparatus corresponding to the video memory data processing method is also provided in the embodiments of the present disclosure, and since the principle of the apparatus in the embodiments of the present disclosure for solving the problem is similar to the video memory data processing method described above in the embodiments of the present disclosure, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 5, which is a schematic diagram of a video memory data processing apparatus provided in an embodiment of the present disclosure, the apparatus includes:
an obtaining module 510, configured to obtain video memory status data of a target terminal in a model training process;
the analysis module 520 is configured to determine, based on the video memory state data, a use condition of each video memory block of the target terminal in a model training process; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block;
a visualization module 530, configured to generate and display a first statistical chart used for characterizing a display fragment distribution condition of the target terminal based on the usage condition of the display block.
In an alternative embodiment, the visualization module 530 generates the first statistical chart by performing the following steps:
classifying the display and memory blocks based on actually used display memory corresponding to each display and memory block and a first ratio between the display and memory capacity of the display and memory blocks to obtain a plurality of groups of display and memory block sets;
generating statistical information of each group of video memory block sets based on the first ratio corresponding to each group of video memory block sets and the total number of video memory blocks in the video memory block sets;
and generating the first statistical chart based on the statistical information of the video memory block sets.
In an optional embodiment, the visualization module 530 is further configured to:
in response to a triggering operation of a first sorting button corresponding to the first statistical chart, determining first target data corresponding to the first sorting button; the first target data comprises a first ratio corresponding to the display and storage block set and the total number of the display and storage blocks corresponding to the display and storage block set;
and sequencing the first target data according to a sequencing rule corresponding to the first sequencing button, and updating the sequencing order of the statistical information of each video memory block set in the first statistical chart based on the sequencing result of the first target data.
In an optional embodiment, the visualization module 530 is further configured to:
determining the number of video memory fragments in each video memory block set based on the first statistical chart;
determining the quantity of the video memory fragments corresponding to each video memory capacity based on the quantity of the video memory fragments of each video memory block set and the video memory capacity corresponding to the video memory block set;
and generating and displaying a second statistical chart based on the quantity of the video memory fragments corresponding to each video memory capacity.
In an optional embodiment, the visualization module 530 is further configured to:
responding to a trigger operation of a second sorting button corresponding to the second statistical chart, and determining second target data corresponding to the second sorting button; the second target data comprises the video memory capacity and the quantity of video memory fragments corresponding to the video memory capacity;
and sequencing the second target data according to a sequencing rule corresponding to the second sequencing button, and updating the arrangement sequence of the quantity of the display memory fragments corresponding to each display memory capacity in the second statistical chart based on the sequencing result of the second target data.
In an optional embodiment, the visualization module 530 is further configured to:
determining the calling times of a plurality of video memory allocation interfaces of the target terminal based on the video memory state data;
and generating and displaying a third statistical chart of the calling condition of the video memory allocation interface based on the calling times of the video memory allocation interface.
In an optional embodiment, the apparatus further comprises an adjusting module 540, configured to:
and adjusting the video memory allocation strategy of the target terminal in the process of training the model based on the first statistical chart, the second statistical chart and the third statistical chart.
In an optional implementation manner, the video memory status data includes a call record of a plurality of video memory allocation interfaces corresponding to the target terminal.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
An embodiment of the present disclosure further provides an electronic device, as shown in fig. 6, which is a schematic structural diagram of the electronic device provided in the embodiment of the present disclosure, and the electronic device includes:
a processor 61 and a memory 62; the memory 62 stores machine-readable instructions executable by the processor 61, the processor 61 being configured to execute the machine-readable instructions stored in the memory 62, the processor 61 performing the following steps when the machine-readable instructions are executed by the processor 61:
acquiring video memory state data of a target terminal in a model training process;
determining the service condition of each display memory block of the target terminal in the process of training a model based on the display memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block;
and generating and displaying a first statistical chart for representing the distribution condition of the display memory fragments of the target terminal based on the use condition of the display memory block.
In an alternative embodiment, the processor 61 executes instructions to generate a first statistical chart for characterizing the video memory fragment distribution of the target terminal based on the usage of the video memory block, where the first statistical chart includes:
classifying the display memory blocks based on actually used display memory corresponding to each display memory block and a first ratio between the display memory capacity of the display memory blocks to obtain a plurality of groups of display memory block sets;
generating statistical information of each group of video memory block sets based on a first ratio corresponding to each group of video memory block sets and the total number of video memory blocks in the video memory block sets;
and generating the first statistical chart based on the statistical information of the video memory block sets.
In an alternative embodiment, the instructions executed by the processor 61 further include:
in response to a triggering operation of a first sorting button corresponding to the first statistical chart, determining first target data corresponding to the first sorting button; the first target data comprises a first ratio corresponding to the display and storage block set and the total number of the display and storage blocks corresponding to the display and storage block set;
and sequencing the first target data according to a sequencing rule corresponding to the first sequencing button, and updating the sequencing order of the statistical information of each video memory block set in the first statistical chart based on the sequencing result of the first target data.
In an alternative embodiment, the instructions executed by the processor 61 further include:
determining the number of video memory fragments in each video memory block set based on the first statistical chart;
determining the quantity of the video memory fragments corresponding to each video memory capacity based on the quantity of the video memory fragments of each video memory block set and the video memory capacity corresponding to the video memory block set;
and generating and displaying a second statistical chart based on the number of the video memory fragments corresponding to each video memory capacity.
In an alternative embodiment, the instructions executed by the processor 61 further include:
responding to the triggering operation of a second sorting button corresponding to the second statistical chart, and determining second target data corresponding to the second sorting button; the second target data comprises the video memory capacity and the quantity of video memory fragments corresponding to the video memory capacity;
and sequencing the second target data according to a sequencing rule corresponding to the second sequencing button, and updating the arrangement sequence of the quantity of the display memory fragments corresponding to each display memory capacity in the second statistical chart based on the sequencing result of the second target data.
In an alternative embodiment, the instructions executed by the processor 61 further include:
determining the calling times of a plurality of video memory allocation interfaces of the target terminal based on the video memory state data;
and generating and displaying a third statistical chart of the calling condition of the video memory allocation interface based on the calling times of the video memory allocation interface.
In an alternative embodiment, the instructions executed by the processor 61 further include:
and adjusting the video memory allocation strategy of the target terminal in the process of training the model based on the first statistical chart, the second statistical chart and the third statistical chart.
In an optional implementation manner, in the instruction executed by the processor 61, the video memory status data includes call records of a plurality of video memory allocation interfaces corresponding to the target terminal.
The storage 52 includes a memory 521 and an external storage 522; the memory 521 is also referred to as an internal memory, and temporarily stores operation data in the processor 51 and data exchanged with an external memory 522 such as a hard disk, and the processor 51 exchanges data with the external memory 522 through the memory 521.
For the specific execution process of the instruction, reference may be made to the steps of the video memory data processing method described in the embodiments of the present disclosure, and details are not described here again.
The embodiments of the present disclosure further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program performs the steps of the video memory data processing method in the foregoing method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The computer program product of the video memory data processing method provided in the embodiments of the present disclosure includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute steps of the video memory data processing method described in the above method embodiments, which may be referred to specifically for the above method embodiments, and are not described herein again.
The embodiments of the present disclosure also provide a computer program, which when executed by a processor implements any one of the methods of the foregoing embodiments. The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing an electronic device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: those skilled in the art can still make modifications or changes to the embodiments described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the technical scope of the disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (11)

1. A video memory data processing method is characterized by comprising the following steps:
acquiring video memory state data of a target terminal in a model training process;
determining the use condition of each display and memory block of the target terminal in the process of training a model based on the display and memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block;
and generating and displaying a first statistical chart for representing the distribution condition of the display memory fragments of the target terminal based on the use condition of the display memory block.
2. The method of claim 1, wherein the first statistical chart is generated by:
classifying the display and memory blocks based on actually used display memory corresponding to each display and memory block and a first ratio between the display and memory capacity of the display and memory blocks to obtain a plurality of groups of display and memory block sets;
generating statistical information of each group of video memory block sets based on a first ratio corresponding to each group of video memory block sets and the total number of video memory blocks in the video memory block sets;
and generating the first statistical chart based on the statistical information of the video memory block sets.
3. The method of claim 2, further comprising:
in response to a triggering operation of a first sorting button corresponding to the first statistical chart, determining first target data corresponding to the first sorting button; the first target data comprises a first ratio corresponding to the display and storage block set and the total number of the display and storage blocks corresponding to the display and storage block set;
and sequencing the first target data according to a sequencing rule corresponding to the first sequencing button, and updating the sequencing order of the statistical information of each video memory block set in the first statistical chart based on the sequencing result of the first target data.
4. A method according to any of claims 1 to 3, characterized in that the method further comprises:
determining the number of video memory fragments in each video memory block set based on the first statistical chart;
determining the quantity of the video memory fragments corresponding to each video memory capacity based on the quantity of the video memory fragments of each video memory block set and the video memory capacity corresponding to the video memory block set;
and generating and displaying a second statistical chart based on the number of the video memory fragments corresponding to each video memory capacity.
5. The method of claim 4, further comprising:
responding to the triggering operation of a second sorting button corresponding to the second statistical chart, and determining second target data corresponding to the second sorting button; the second target data comprises the video memory capacity and the quantity of video memory fragments corresponding to the video memory capacity;
and sequencing the second target data according to a sequencing rule corresponding to the second sequencing button, and updating the arrangement sequence of the quantity of the display memory fragments corresponding to each display memory capacity in the second statistical chart based on the sequencing result of the second target data.
6. The method of claim 4, further comprising:
determining the calling times of a plurality of video memory allocation interfaces of the target terminal based on the video memory state data;
and generating and displaying a third statistical chart of the calling condition of the video memory allocation interface based on the calling times of the video memory allocation interface.
7. The method of claim 6, further comprising:
and adjusting the video memory allocation strategy of the target terminal in the process of training the model based on the first statistical chart, the second statistical chart and the third statistical chart.
8. The method according to claim 1, wherein the video memory status data includes call records of a plurality of video memory allocation interfaces corresponding to the target terminal.
9. A video memory data processing apparatus, comprising:
the acquisition module is used for acquiring video memory state data of the target terminal in the process of training the model;
the analysis module is used for determining the use condition of each display memory block of the target terminal in the process of training the model based on the display memory state data; the using condition of the display and storage block comprises the display and storage capacity of the display and storage block and the actual used display and storage of the display and storage block;
and the visualization module is used for generating and displaying a first statistical chart for representing the display fragment distribution condition of the target terminal based on the use condition of the display block.
10. An electronic device, comprising: a processor, a memory, the memory storing machine readable instructions executable by the processor, the processor being configured to execute the machine readable instructions stored in the memory, the processor performing the steps of the video memory data processing method according to any one of claims 1 to 8 when the machine readable instructions are executed by the processor.
11. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program is executed by an electronic device, and the electronic device executes the steps of the video memory data processing method according to any one of claims 1 to 8.
CN202210993354.5A 2022-08-18 2022-08-18 Video memory data processing method and device, electronic equipment and storage medium Withdrawn CN115358915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210993354.5A CN115358915A (en) 2022-08-18 2022-08-18 Video memory data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210993354.5A CN115358915A (en) 2022-08-18 2022-08-18 Video memory data processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115358915A true CN115358915A (en) 2022-11-18

Family

ID=84003052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210993354.5A Withdrawn CN115358915A (en) 2022-08-18 2022-08-18 Video memory data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115358915A (en)

Similar Documents

Publication Publication Date Title
CN105205014A (en) Data storage method and device
CN112069341A (en) Background picture generation and search result display method, device, equipment and medium
CN105959469B (en) Short message display method, display device and terminal
CN112116212A (en) Application evaluation method and device, storage medium and electronic equipment
CN113504964B (en) Page component height determination method, page component height determination device, computer equipment and storage medium
CN111338934A (en) Page refreshing test method and device, computer equipment and storage medium
CN113378059A (en) Page display method and device, computer equipment and storage medium
CN113713396A (en) Method and device for displaying checkpoint information, computer equipment and storage medium
CN106898351B (en) Control method and device for large screen
CN112181419A (en) Interface generation method and device and storage medium
CN115358915A (en) Video memory data processing method and device, electronic equipment and storage medium
CN110321125B (en) Data configuration method and device for cells and readable storage medium
CN114706581A (en) Image analysis method, image analysis device, computer equipment and storage medium
CN113961610A (en) Data processing method, device, equipment and storage medium
CN115495303A (en) Frame rate processing method, device, storage medium and terminal
CN111951355A (en) Animation processing method and device, computer equipment and storage medium
CN112835774A (en) Visualization method and device for performance of display card, equipment and computer-readable storage medium
CN111209424A (en) Picture display method and device
CN113791962A (en) Method and device for determining frame rate of picture
CN117573847B (en) Visualized answer generation method, device, equipment and storage medium
JP2018045546A (en) Information generation system, device, method, and program
CN115914120B (en) Message sending method, device, computer equipment and computer readable storage medium
CN114968572A (en) Method and device for determining occupied memory during picture loading
CN112084352B (en) Data processing method, data display method and device
CN112402955B (en) Game log recording method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20221118

WW01 Invention patent application withdrawn after publication