Compatibility automatic testing method and system for multi-platform operator
By building an operator portrait and test combination platform, the test cases are automatically generated, and the problem of accurate compatibility testing in a multi-platform environment in the existing technology is solved, and an efficient and automated test process is realized, reducing costs.
Patent Information
- Application Number
- CN202411966429.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-23
AI Technical Summary
When testing the compatibility of operators, it is difficult for the prior art to implement precise testing in a multi-platform environment, resulting in inefficient testing and a large number of manual writing test cases, which increases labor and time costs.
By building an operator portrait, we can gain an in-depth understanding of the functions, performance, input and output characteristics and dependencies of the operator, build a test combination platform based on this, automatically generate test cases, and conduct compatibility testing.
It improves the targetedness and adaptability of tests, reduces the workload of manually writing test cases, saves labor and time costs, and improves testing efficiency.
Smart Images

Figure CN120029904A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multi-platform operator-oriented automatic compatibility testing method and system thereof. Background Art
[0002] In the field of software and hardware technology, operators play a critical role in many fields such as artificial intelligence, data processing, scientific computing, etc. Operator compatibility is crucial to ensure that software systems run stably and efficiently on different platforms.
[0003] At present, the existing operator testing methods mainly focus on the operator function verification and performance tuning on a single platform or in a specific environment, so that the traditional testing methods are often only targeted at a specific operating system and hardware architecture. If the test environment is not accurate enough, it is easy to cause poor compatibility testing accuracy, which in turn leads to poor testing efficiency. In addition, manually writing test cases to verify the compatibility of the operator in the environment one by one, for more complex platform scenarios, a large number of test cases need to be manually written, resulting in high labor and time costs. Summary of the invention
[0004] The purpose of the present invention is to solve the problems in the prior art and to propose a multi-platform operator-oriented automatic compatibility testing method and system thereof.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The automatic compatibility testing method for multi-platform operators includes the following steps:
[0007] An operator profile is constructed based on the acquired target operator to be tested, and a test combination platform is constructed based on the operator profile, wherein the target operator includes any operator extracted from an operator library or an algorithm to be tested; and the test combination platform includes at least two groups of test platforms;
[0008] Deploy the target operator in each test platform of the test combination platform to obtain a target combination platform;
[0009] Inputting the target operator into a use case generation model to obtain a target test case output by the use case generation model; the use case generation model is trained based on label results of sample operators and their corresponding test cases;
[0010] A compatibility test is performed on the target combination platform based on the target test case to obtain a test result.
[0011] According to the multi-platform operator compatibility automatic testing method provided by the present invention, the operator profile is constructed based on the acquired target operator to be tested, including:
[0012] Determining a first profile based on operator characteristics of the target operator; the operator characteristics include functions, performance requirements, input and output data formats, dependencies, and historical compatibility of the operator;
[0013] The development information and usage feedback information of the target operator are integrated with the first portrait to obtain a second portrait;
[0014] The second portrait is structured and visually represented based on the knowledge graph to obtain the operator portrait.
[0015] According to the automatic compatibility testing method for multi-platform operators provided by the present invention, the structured storage and visual representation of the second portrait based on the knowledge graph to obtain the operator portrait includes:
[0016] Determine the target operator in the second portrait as a core entity, determine the operator feature of the target operator as an independent entity, and construct a knowledge graph framework;
[0017] Determining a relationship type based on the logical relationship between the independent entities;
[0018] Based on the relationship type and the knowledge graph framework, construct a knowledge graph model;
[0019] The knowledge graph model is stored in a graph database, each of the independent entities is stored as a node in the graph database, the attribute value corresponding to the independent entity is stored in the attribute field of the node in the form of a key-value pair, and the relationship between the independent entities is stored as an edge connecting the nodes, so as to obtain a knowledge graph of the second portrait
[0020] The knowledge graph of the second portrait is visualized to obtain the operator portrait.
[0021] According to the automatic compatibility testing method for multi-platform operators provided by the present invention, the test combination platform is constructed based on the operator portrait, including:
[0022] Annotate the metadata of each hardware resource, operating system, and software dependency library in the platform resource pool to obtain the annotated platform resource pool;
[0023] Matching the demand factors of the operator portrait with the annotated platform resource pool to obtain multiple test platforms;
[0024] The multiple test platforms are configured to obtain the test combination platform.
[0025] According to the automatic compatibility testing method for multi-platform operators provided by the present invention, the demand elements include functional requirements, performance requirements and input and output requirements; the demand elements based on the operator profile are matched with the annotated platform resource pool to obtain multiple test platforms, including:
[0026] Extract and transform the functional requirement data of the operator portrait to obtain functional keywords
[0027] Semantically matching the functional keywords with the annotated platform resource pool to obtain a first test platform;
[0028] Quantifying the performance requirement data of the operator portrait to obtain a quantified value;
[0029] Perform threshold matching on the quantized value and the labeled platform resource pool to obtain a second test platform;
[0030] Matching the input and output demand data of the operator portrait with the annotated platform resource pool in terms of format support to obtain a third test platform;
[0031] The first test platform, the second test platform and the third test platform are determined as the multiple test platforms.
[0032] According to the multi-platform operator-oriented compatibility automatic testing method provided by the present invention, the training step of the use case generation model includes:
[0033] Acquire sample data, input the sample data into a pre-trained model, and obtain a prediction result output by the pre-trained model; obtain a loss value according to the prediction result based on the loss function of the pre-trained model; adjust the optimization function in the pre-trained model based on the loss value; predict the prediction result of the sample data based on the adjusted pre-trained model, until three consecutive sets of loss values output by the loss function are less than or equal to a preset threshold and three consecutive sets of loss values decrease successively, thereby obtaining a target model.
[0034] According to the automatic compatibility testing method for multi-platform operators provided by the present invention, the optimization function of the use case generation model is:
[0035]
[0036] Among them, θ t represents the model parameters at time t; α represents the learning rate; L(θ) represents the loss function; represents the gradient of the loss function with respect to the model parameters; β and γ both represent weight coefficients; m represents the gradient information considering the past few time steps.
[0037] The automatic compatibility testing system for multi-platform operators is applied to the automatic compatibility testing method for multi-platform operators as described above; the automatic compatibility testing system for multi-platform operators comprises:
[0038] A portrait generation unit: used to construct an operator portrait of a target operator to be tested based on the acquired target operator; the target operator includes any operator extracted from an operator library or an algorithm to be tested;
[0039] A platform construction unit: used to construct an operator profile based on the acquired target operator to be tested, and to construct a test combination platform based on the operator profile; the target operator includes any operator extracted from an operator library or an algorithm to be tested; the test combination platform includes at least two groups of test platforms;
[0040] A use case generation unit is used to input the target operator into a use case generation model to obtain a target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case;
[0041] Testing unit: used to test the target combination platform based on the target test case to obtain the test result.
[0042] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the automatic compatibility testing method for multi-platform operators as described in any one of claims 1 to 7 are implemented.
[0043] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the automatic compatibility testing method for multi-platform operators as described in any one of claims 1 to 7.
[0044] Compared with the prior art, the present invention has the following advantages:
[0045] The automatic compatibility testing method and system for multi-platform operators provided by the present invention construct an operator portrait for the acquired target operator to be tested, and construct a corresponding test combination platform based on the operator portrait, so as to realize in-depth analysis of various characteristics of the operator by constructing the operator portrait, and then when constructing the test combination platform, it can be carried out closely around the actual needs of the target operator, thereby improving the pertinence and adaptability of the test, and avoiding the problem that the test environment is not accurate enough, which easily causes poor compatibility test accuracy and thus leads to poor test efficiency; in addition, through the target operator and use case generation model, the target test case for testing is automatically generated, and the target combination platform on which the target operator is deployed is tested using the target test case to obtain the test result, thereby realizing automatic generation of test cases in multi-platform testing, reducing the workload of manually writing use cases, saving manpower and time costs, and thus improving the test efficiency as a whole. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 A schematic diagram of a flow chart of an automatic compatibility testing method for multi-platform operators provided by an embodiment of the present invention;
[0048] Figure 2 A schematic diagram of the structure of an automatic compatibility testing system for multi-platform operators provided by an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the structure of the electronic device proposed by the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] Combine the following Figure 1 - Figure 3 The present invention describes the multi-platform operator-oriented automatic compatibility testing method and system thereof.
[0052] Figure 1FIG. 1 is a flow chart of the automatic compatibility testing method for multi-platform operators provided by the present invention. Figure 1 As shown, the method includes:
[0053] Step 101, constructing an operator profile based on the acquired target operator to be tested, and constructing a test combination platform based on the operator profile; the target operator includes any operator extracted from an operator library or an algorithm to be tested; the test combination platform includes at least two groups of test platforms.
[0054] Specifically, an operator portrait is constructed based on the acquired target operator to be tested, including: determining a first portrait based on the operator characteristics of the target operator; the operator characteristics include the operator's functions, performance requirements, input and output data formats, dependencies and historical compatibility; integrating the development information and usage feedback information of the target operator with the first portrait to obtain a second portrait; and performing structured storage and visual representation of the second portrait based on the knowledge graph to obtain an operator portrait.
[0055] By building an operator portrait, we can gain in-depth understanding of the operator's functional characteristics, performance requirements, input and output characteristics, dependencies, historical compatibility and other information, so as to build a customized test combination platform based on these detailed information. For example, for a deep learning operator with specific hardware acceleration requirements, when building the platform, we can accurately select a hardware environment equipped with a corresponding high-performance GPU and compatible driver, and match it with a specific version of the deep learning framework and dependent library, avoiding the situation where the test environment does not match the actual needs of the operator, greatly improving the pertinence and effectiveness of the test.
[0056] In addition, a test combination platform consisting of at least two test platforms can be constructed to simulate a variety of actual use environments, including different operating systems, hardware architectures, and software dependency library combinations, and comprehensively test the compatibility of operators under diverse platforms. For example, an operator in a mobile application may need to be tested under iOS and Android operating systems, hardware environments of different models of mobile phones, and various versions of third-party libraries. Through multi-platform coverage, compatibility issues that may arise in operators in different scenarios can be discovered to ensure that they work properly in a wide range of applications. It also avoids the problem that the test environment is not accurate enough, which easily leads to poor compatibility testing accuracy, and then leads to poor testing efficiency.
[0057] Furthermore, in the process of determining the operator portrait through operator characteristics, the operator is analyzed from multiple dimensions such as the operator's function, performance requirements, input and output data format, dependency, and historical compatibility, which can comprehensively and systematically sort out the basic characteristics of the operator, and then form a relatively complete initial understanding framework, which is helpful to have a clear grasp of the overall situation of the operator in the early stage. When obtaining the second portrait, the development information contains detailed background knowledge such as the original intention of the operator design, the internal logical structure, and the technology selection. The feedback information reflects the performance of the operator in the actual application scenario, the problems encountered, and the actual needs and expectations of the user. Fusion of this information with the first portrait can make the operator portrait closer to the actual situation, truly reflect the behavior and performance of the operator in different environments, and thus improve the reliability of the second portrait. Finally, when the second portrait is structured and stored using knowledge graph technology, the knowledge graph organizes data in the form of a graph, which can clearly show the complex relationship between the elements in the operator portrait, including the association between function and performance, the connection between input and output and dependency, etc., so as to help quickly understand the internal structure and logic of the operator.
[0058] Furthermore, the second portrait is structured and visually represented based on the knowledge graph to obtain a detailed description of the operator portrait. The specific steps are as described in 1011-1015.
[0059] Step 102, deploy the target operator in each test platform of the test combination platform to obtain the target combination platform.
[0060] Specifically, by adopting a unified deployment process for the target operator, it is not only convenient to use test cases to test the test combination platform in subsequent steps, but also can ensure the standardization and consistency of deployment on different test platforms, so as to reduce deployment errors caused by human operations and environmental configuration differences.
[0061] Furthermore, during the operator deployment process, the code files of the target operator (including source code files, header files, configuration files, etc.) are transferred from the code repository or local development environment to each test platform. Use file transfer protocols (such as FTP, SFTP, etc.) or client tools of the version control system (such as Git's gitclone command) to achieve code transmission. Then, according to the programming language and development environment requirements of the target operator, compile and build operations are performed on the test platform. For example, for C++ code, you need to use the g++ compiler and write appropriate compilation commands based on the operator's dependencies and compilation options (such as optimization level, include path, library path, etc.). For other programming languages, such as Python, no compilation steps are required. You only need to create a virtual environment and install dependent libraries to ensure that the operator's operating environment is independent and clean.
[0062] Furthermore, after the deployment is completed, a simple test case of the target operator can be run on each test platform to verify whether the target operator can be correctly started and perform basic functions on the platform. The test case is pre-defined and representative input data, calling the main functional interface of the operator, and checking whether the output result meets expectations. For example, for a simple addition operator, the test case can be to input two integers 1 and 2, call the calculation function of the addition operator, and then check whether the output result is 3. If the output result does not meet expectations, it is necessary to check whether there are errors in the deployment process, such as incorrect installation of dependent libraries, configuration file errors, code compilation errors, etc., and perform corresponding debugging and repairs.
[0063] At the same time, when running simple functional tests, use system performance monitoring tools (such as top, htop and other commands to monitor CPU and memory usage, and nvidia-smi command to monitor GPU usage) to monitor the resource usage of the test platform and record the CPU usage U of the operator during operation. CPU 、Memory usage M used 、GPU usage U GPU When recording the performance indicators, we preliminarily evaluate the performance of the operator on each test platform and calculate some simple performance indicators, such as the number of operations completed per unit time (such as the number of addition operations per second) or resource utilization (such as the ratio of CPU utilization to memory usage). These performance indicators serve as a reference for subsequent detailed performance tests to help determine whether the performance of the operator on the platform meets expectations. If the performance is significantly lower than expected, it may be necessary to further optimize the configuration of the test platform (such as adjusting hardware resource allocation, optimizing software environment settings, etc.) or optimize the performance of the operator code.
[0064] Step 103, input the target operator into the use case generation model to obtain the target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case.
[0065] Specifically, the use case generation model is trained based on the label results of a large number of sample operators and their test cases, and can learn the test rules and requirements of different types of operators in various situations, so as to generate comprehensive and targeted test cases for the target operator. For example, for a numerical calculation operator, the model can automatically generate test cases covering various data types (integers, floating-point numbers, complex numbers, etc.), different value ranges (boundary values, normal values, abnormal values, etc.) and various operation combinations. Compared with manually writing test cases, it not only saves a lot of manpower and time costs, but also can more comprehensively detect the compatibility of operators and discover more potential problems. And with the emergence of new operator types and test scenarios, the use case generation model can also adapt to changes by continuously updating training data, and continuously improve the quality and adaptability of use case generation. For example, when a new type of encryption operator appears, it only needs to collect enough sample data of this type of operator to retrain the model, and the model can generate suitable test cases for it, without having to manually write a large number of use cases from scratch, which has strong flexibility and scalability.
[0066] Furthermore, sample operators can be obtained from operator libraries, open source code libraries, and past project practices, covering different functional types (such as numerical calculation, image processing, data encryption, etc.), different levels of complexity (such as from simple basic operation operators to complex deep learning model operators) and different application fields (such as scientific computing, finance, medical care, communications, etc.).
[0067] Furthermore, in one embodiment, the collected sample operator set is defined as O = {o 1 , o 2 ,…,o n}, where each o i represents a sample operator, and has its own unique functional characteristics, performance requirements, input and output formats, and dependencies. And for each sample operator o i , analyze and mark it in detail, extract the above key attribute information, and construct the feature vector of the sample operator where f i represents the functional feature vector, p i Represents the performance requirement vector (such as computational complexity, memory requirements, and other quantitative indicators), io i represents the input and output feature vectors (including input data type, format, range, output data structure, precision, etc.), d i Represents a dependency vector (such as dependent software libraries and hardware resource information).
[0068] When the test case label result is determined, for each sample operator o i, the test cases should cover various possible input conditions, boundary conditions, abnormal conditions and different operating environment configurations. i The test case set is set to T i ={t i1 ,t i2 ,…,t in}, where each t ij Represents a test case, including input data I ij And the expected output O ij After executing the test case, each test case is labeled according to the test result to determine its label result y ij The label result can be a binary classification (such as pass / fail) or a more detailed classification (such as correct functionality but performance does not meet requirements, a specific type of error occurs, etc.). For example, if the test case t ij The actual output result is different from the expected output result O ij If the match is complete and the performance index is within a reasonable range, mark y ij =1 (passed); otherwise, mark y ij =0 (indicates failure).
[0069] Step 104: Perform compatibility test on the target combination platform based on the target test case to obtain a test result.
[0070] Specifically, before starting the compatibility test, recheck the hardware configuration information of the target platform, including the CPU model and core number. n , CPU frequency f, GPU model and computing power G p 、Memory capacity M c and memory frequency M f 、Storage capacity S c and storage read and write speed S r etc., to ensure that it is consistent with the expected configuration when the target operator was deployed previously, and that there is no hardware failure or unexpected configuration change. Hardware parameters can be obtained through corresponding command instructions or hardware detection tools. For example, in Linux systems, use the lscpu command to obtain CPU information, use the nvidia-smi command (NVIDIA GPU is installed) to obtain GPU information, use the free-m command to obtain memory information, and use the hdparm-Tt / dev / sda (the main hard disk is / dev / sda) command to obtain storage information.
[0071] Then confirm the operating system version on the target combination platform v, operating system type, installed software dependency libraries and their version information to ensure that the target operator's operating requirements are met and that the test results are not affected by system updates, software library conflicts, and other issues during the test. Software dependency library information can be obtained through the operating system's package management tools (such as apt, yum, etc.) or specific programming language package management tools (such as Python's piplist).
[0072] During the target test case loading process, the generated target test case set T tar ={t tar,1 ,t tar,2 ,…,t tar,n} is loaded into the test execution environment on the target combination platform, and each target test case t tar,j Contains input data I tar,j And the expected output O tar,j , ensure that the format, range and content of the input data are consistent with those designed for the target test case, and can be correctly passed to the target operator for processing.
[0073] It should be noted that for some target test cases with configurable adoption numbers, such as target test cases involving parameters such as the number of algorithm iterations and data sampling rate, appropriate parameter values should be set according to the test plan and the characteristics of the target operator. tar,j With n configurable parameters p j1 , p j2 ,…,p jn , according to the predetermined parameter configuration strategy (such as uniform sampling, logarithmic sampling, setting based on empirical values, etc.), select a suitable value for each parameter to obtain a complete target test case configuration in Represents the configuration value of the i-th parameter in the j-th target test case.
[0074] During the target test case execution process, each target test case is run on the target combination platform in turn. tar,j , input data I tar,j The target operator is passed to the target operator, and the performance monitoring tool and logging tool are started. The performance monitoring tool is used to collect various performance indicators of the target operator during the execution of the test case. For example, the calculation time T exec,j 、Peak memory usage M peak,j 、Average memory usage M avg,j 、CPU usage U CPU,j 、GPU usage U GPU,j , Disk I / O read and write volume D io,jEtc. At the same time, the above performance indicators can be adjusted according to actual needs, and can be obtained through the performance monitoring interface provided by the operating system (such as the / proc file system and perf tool in the Linux system) or third-party performance monitoring software (such as Intel VTune, NVIDIA Nsight, etc.).
[0075] At the same time, the logging tool is used to record the running status information, error information and abnormal conditions of the target operator during the execution of the test case. For example, it records whether the operator has data parsing errors, memory allocation failures, function call exceptions, etc. when processing input data, as well as the specific location and context information of these problems. At the same time, the execution order, start time and end time of the test case are recorded to facilitate the subsequent analysis of the integrity and stability of the test process.
[0076] The present invention relates to the field of artificial intelligence, and proposes an automatic compatibility testing method for multi-platform operators. In the present invention, the proposed automatic compatibility testing method for multi-platform operators can first obtain the target operator to be tested, and construct an operator portrait for the target operator, and based on the operator portrait, construct a corresponding test combination platform, so as to achieve in-depth analysis of various characteristics of the operator by constructing the operator portrait, and then when constructing the test combination platform, it can be closely carried out around the actual needs of the target operator, improve the pertinence and adaptability of the test, and avoid the problem that the test environment is not accurate enough, which is easy to cause poor compatibility test accuracy, and then lead to poor test efficiency; in addition, through the target operator and use case generation model, the target test case for testing is automatically generated, and the target combination platform deploying the target operator is tested using the target test case to obtain the test result, so as to achieve automatic generation of test cases in multi-platform testing, reduce the workload of manually writing use cases, save manpower and time costs, and then improve the test efficiency as a whole.
[0077] In one embodiment, the description of steps 1011 to 1015 is as follows:
[0078] Step 1011, determine the target operator in the second portrait as a core entity, determine the operator feature of the target operator as an independent entity, and construct a knowledge graph framework.
[0079] Specifically, first clarify the core position of the target operator in the entire knowledge graph and use it as the central node. For example, if the target operator is an image recognition operator, the node can be marked as "Image RecognitionOperator". For operator features, functional characteristics, performance requirements, input and output data formats, dependencies, and historical compatibility are treated as independent entities. Taking functional characteristics as an example, if the image recognition operator has functions such as feature extraction and classification, "Feature Extraction" and "Classification" become independent entities related to the core node. Similarly, for performance requirements, if the operator requires T seconds of computing time and M bytes of memory when processing images of a certain size, "Computation Time (T)" and "Memory Requirement (M)" are also treated as independent entities. Finally, a preliminary framework is constructed to use the potential connections between nodes to represent the relationship between these entities. For example, the core node "Image Recognition Operator" has a potential relationship of "has Function" with functional entities such as "Feature Extraction" and "Classification", and has a potential relationship of "has Performance Requirement" with performance entities such as "Computation Time (T)" and "Memory Requirement (M)".
[0080] By clarifying the core entities and independent entities, a well-organized knowledge architecture is built, making the understanding of operators clearer from the overall to the local. For example, in a complex data analysis operator, the core computing functions and specific indicators of related performance bottlenecks can be quickly located, which helps to deeply analyze the characteristics of the operator. And when new operator features need to be added or existing features need to be updated, the entity-based framework can be easily expanded.
[0081] Step 1012, determining the relationship type based on the logical relationship between the independent entities.
[0082] Specifically, for the relationship between functional characteristics and performance requirements, if a complex function (such as multi-layer convolution operations in deep learning models) causes high computational complexity and memory requirements, then the relationship between them is determined to be "causes High Performance Requirement". Specifically, if the computational complexity of the convolution operation is O(n 2)(where n represents the dimension of the input data), the functional relationship can be determined through static analysis of the operator code or performance monitoring during actual runtime, and it can be annotated as an attribute of the relationship.
[0083] Regarding the relationship between input and output data formats and dependencies, if a certain input data format (such as a specific image encoding format) requires a specific software library for parsing, then the relationship between them can be defined as "requiresLibrary For Format". For example, for a new medical image format, a special image processing library is required for reading and preprocessing. At this time, this dependency can be clarified and the name and version information of the relevant software library can be recorded as the attributes of the relationship.
[0084] Regarding the relationship between historical compatibility and other features, if past tests have found that the performance of the operator under a certain operating system version has significantly decreased (for example, under Windows 7, the calculation time has been extended by 50%), then the relationship between historical compatibility and performance requirements can be marked as "has Performance Issue On", and the specific performance degradation data can be used as the attribute value of the relationship.
[0085] It is obvious that by clearly defining the relationship type and its attributes, the semantic connection between independent entities can be accurately expressed, avoiding ambiguity and ambiguity. At the same time, this precise relationship definition provides the basis for the reasoning ability of the knowledge graph.
[0086] Step 1013, construct a knowledge graph model based on the relationship type and the knowledge graph framework.
[0087] Specifically, in the process of building a knowledge graph model, a graph database (such as Neo4j, Neo4jGraphDatabase, etc.) is used for construction. In the graph database, core entities and independent entities are created as nodes, and the nodes have unique identifiers (such as node IDs) and attribute fields. According to the determined relationship type, directed edges are created between nodes to represent the relationship between entities.
[0088] The constructed knowledge graph model intuitively displays the relationship between operators and their features in the form of a graph, so that developers, testers, and other relevant personnel can understand the overall picture of the operator at a glance.
[0089] Step 1014, store the knowledge graph model in a graph database, store each independent entity as a node in the graph database, store the attribute value of the corresponding independent entity in the attribute field of the node in the form of a key-value pair, and store the relationship between each independent entity as an edge connecting the nodes, to obtain the knowledge graph of the second portrait.
[0090] Specifically, in a graph database, node creation statements (such as Neo4j's CREATE statement) are used to create nodes representing independent entities, and SET statements are used to set node properties. Use relationship creation statements (such as CREATE statements combined with relationship types) to create edges between nodes. In this way, the entire knowledge graph model is stored in the graph database to form a complete knowledge graph of the second portrait, which contains all the feature information of the operators and their mutual relationships, and can be flexibly queried and retrieved through the query language of the graph database (such as the Cypher query language). And the knowledge graph is stored in the form of a graph database, which realizes the structured management of data and ensures the consistency and integrity of the data.
[0091] Step 1015, visualize the knowledge graph of the second portrait to obtain an operator portrait.
[0092] Specifically, visualization tools (such as Neo4j Browser, Gephi, etc.) are used to visualize the knowledge graph stored in the graph database. These tools can display the knowledge graph in the form of a graph according to the type of node, attribute, and type of relationship, where nodes usually use different shapes and colors to represent different entity types, and edges use different line styles and colors to represent different relationship types. At the same time, the visualization effect can also be customized as needed, such as adjusting the size and color of the node according to its importance attribute, or highlighting certain specific types of relationships, so as to more clearly display the key information in the operator portrait. The visualization presentation displays the complex knowledge graph in an intuitive graphical way, allowing users to quickly understand the overall picture of the operator and the relationship between each feature without having to deeply understand the structure and query language of the graph database.
[0093] In one embodiment, in step 101, a test combination platform is constructed based on the operator portrait, including: annotating the metadata of each hardware resource, operating system, and software dependency library in the platform resource pool to obtain a labeled platform resource pool; matching the demand factors based on the operator portrait with the labeled platform resource pool to obtain multiple test platforms; configuring the multiple test platforms to obtain a test combination platform.
[0094] Specifically, for the CPU label in the hardware resources, record its model, number of cores (C n , such as 18 cores, 32 cores), basic frequency (f b , such as 3.0 3.0GHz, 3.4GHz, etc.), turbo frequency (f t , such as 4.6GHz, 4.9GHz, etc.), cache size (L s, such as 24.75MB, 64MB, etc.) and instruction set support (such as AVX2, AVX-512, etc.). It can be expressed in vector form as Where I is the instruction set.
[0095] For GPU annotation, record its model (such as NVIDIA GeForce RTX 3090, AMD Radeon RX 6900 XT, etc.), CUDA core number Video memory capacity (M c , such as 24GB, 16GB, etc.), memory bandwidth (M b , such as 936GB / s, 512GB / s, etc.), computing power (G P , such as 8.6, 7.1, etc.) is expressed as
[0096] For content standards, record its capacity (M v , such as 32GB, 64GB, etc.), frequency (M f , such as 3200MHz, 4000MHz, etc.), timing (M t , such as CL16, CL18, etc.), recorded as
[0097] For storage device labels, record its capacity (S c , such as 1TB, 2TB, etc.), read and write speed (S r , sequential read speed such as 3500MB / s, sequential write speed such as 3000MB / s, etc.), that is
[0098] For operating system labels, record the operating system name (such as Windows 10, Windows 11, Ubuntu 20.04, Ubuntu 22.04, etc.), version number (O v , such as 10.0.19044, 22.04.1, etc.), whether it is a 64-bit operating system (O 64 , 1 for yes, 0 for no), kernel version ( k , such as 4.19, 5.15, etc.), system type (O t , such as server version, desktop version, etc.). It can be expressed as
[0099] For each software dependency library label, record its name (such as TensorFlow, PyTorch, NumPy, etc.), version number (V v , such as 2.5.0, 1.10.1, etc.), other dependent libraries (D v , such as TensorFlow relies on Protobuf, CUDA, etc.), functional description (Fv , such as TensorFlow for building and training deep learning models). It is represented by a vector
[0100] Through detailed metadata annotation, we can clearly understand the specific characteristics of each component in the platform resource pool. In the subsequent matching process, we can accurately find the most suitable resource combination according to the needs of the operator portrait, avoiding mismatches caused by unclear resource information.
[0101] The detailed process of matching the hardware resources with the requirement factors of the operator profile after labeling them. The specific steps are as described in 10121-10126.
[0102] After the matching is completed, for each test platform, according to the selected operating system and software dependency library combination, the software is installed and configured, and the software dependency library is installed using the operating system's package management tool (such as apt, yum, etc.) or the package management tool of a specific programming language (such as Python's pip). During the installation process, ensure that the dependencies are correctly resolved. For example, if a software dependency library depends on other libraries, automatically install the libraries it depends on and their correct versions. For software that requires specific configuration (such as database software that requires setting usernames, passwords, ports, etc.), perform reasonable configuration according to the test requirements, and record the configuration information for use in subsequent testing processes.
[0103] For specific hardware devices (such as GPU), install the corresponding hardware drivers. Ensure that the driver version is compatible with the hardware device and operating system, and make necessary optimization settings, such as adjusting the GPU's video memory allocation strategy, power management mode, etc., to improve the performance and stability of the hardware. For the CPU, it may be necessary to adjust some kernel parameters (such as CPU frequency scaling strategy, memory allocation parameters, etc.) according to the test requirements, which can be achieved by modifying the relevant configuration files of the operating system (such as / etc / sysctl.conf). Finally, set the necessary environment variables to ensure that the software dependency libraries and operators can run correctly. For example, for software that requires dynamic link libraries, add the path of the dynamic link library to the LD_LIBRARY_PATH environment variable; for Python-based operators and dependency libraries, set the PYTHONPATH environment variable so that it can import modules correctly.
[0104] Furthermore, the demand elements include functional requirements, performance requirements, and input / output requirements. In one embodiment, steps 10121-10126 are as follows:
[0105] Step 10121, extract and transform the functional requirement data of the operator portrait to obtain functional keywords.
[0106] Specifically, the keyword extraction algorithm in natural language processing technology, such as TF-IDF (TermFrequency-Inverse Document Frequency) algorithm and TextRank algorithm, is used to extract key functional vocabulary and its variants from the functional description. Taking the TF-IDF algorithm as an example, for a corpus containing δ documents (here different functional descriptions of operators can be regarded as different documents), the word t t The TF-IDF value in document d is calculated as: TF-IDF(t t ,d)=TF(t t ,d)*IDF(t t ), where TF(t t ,d) represents word t t The word frequency in document d is calculated as: in, Representation word t t The number of times it appears in document d, ∑ k δ k,d represents the sum of the occurrences of all words in document d; IDF(t t ) represents word t t The inverse document frequency of , the calculation work is: Where N is the total number of documents in the corpus, DF(t t ) means containing word t t By calculating the TF-IDF value of each word, select the word with higher value as the functional keyword. And convert it into a unified format (such as removing stop words, stemming or word form restoration, etc.), and get the final functional keyword set {K 1 , K 2 , …, K A}.
[0107] Step 10122, semantically match the functional keywords with the annotated platform resource pool to obtain the first test platform.
[0108] Specifically, for the software dependency libraries in the platform resource pool after annotation, each library has its corresponding functional description information (such as the functional description vector recorded in the annotation process). g represents the g-th software dependency library). Use semantic similarity calculation methods, such as cosine similarity, to calculate the similarity between the function keywords and the function descriptions of the software dependency libraries. The function keyword set is represented by vector represents (where ω i Indicates keyword K i The weight of the software dependency library is determined by the TF-IDF value. (where fj represents the feature value of the jth functional word in the description), then the cosine similarity calculation formula between them is: A similarity threshold (such as 0.6) is preset, and for each software dependency library, its similarity with the functional keyword set is calculated. If the similarity exceeds the threshold, the software dependency library and its operating system and related hardware resource combination are considered as a potential first test platform candidate.
[0109] Step 10123, quantify the performance requirement data of the operator portrait to obtain a quantized value.
[0110] Specifically, the performance requirements in the operator profile usually include computational complexity, memory requirements, storage requirements, and running time requirements. For computational complexity, if the operator is a numerically intensive algorithm (such as matrix multiplication), the time complexity formula of the algorithm can be used. For example, for n*n matrix multiplication, the time complexity is P(n 3 ), combined with the actual data scale range to be processed (assuming the data scale is E), estimate the required computing capacity (in FLOPS). For memory requirements, analyze the memory usage of the operator when processing different data scales. Determine the quantitative value of memory requirements by running a simplified version of the operator in a simulation environment or referring to the memory usage experience of similar operators in the past. For example, it is found that when processing a certain scale of image data, the operator needs to occupy 2GB of memory on average, and the peak may reach 3GB, so the memory requirements are quantified as 2GB (average) and 3GB (peak). For storage requirements, estimate the required storage capacity based on factors such as the amount of data processed by the operator, the amount of intermediate result storage, and possible log files. For example, if the operator needs to process a data set of 500MB, and will generate approximately 200MB of intermediate results and 100MB of log files during the processing, the storage requirement is quantified to 800MB. For runtime requirements, if the operator needs to meet certain real-time requirements in a specific scenario (such as completing a processing task within 1 second), the runtime is quantified to 1 second. These quantified performance requirements are organized into a performance requirement vector Where R i Represents the quantitative value of the i-th personality indicator.
[0111] By quantifying the performance requirements into specific values, accurate comparison and judgment can be made when matching with platform resources, avoiding the uncertainty caused by vague performance descriptions, improving the accuracy of test platform selection, and ensuring that the selected platform can truly meet the performance requirements of the operator.
[0112] Step 10124, threshold matching is performed on the quantized value and the annotated platform resource pool to obtain a second test platform.
[0113] Specifically, for the hardware resources and software environment in the annotated platform resource pool, the annotated performance parameters (such as CPU computing power, GPU FLOPS value, memory capacity and bandwidth, storage capacity and read / write speed, etc.) are compared with the quantitative performance requirements of the operator. 1 (Assuming 10^6 FLOPS), check whether the sum of the computing power of the CPU and GPU in the platform resource pool exceeds the requirement. If a platform is equipped with an Intel Core i9 processor (whose theoretical computing power is H FLOPS) and an NVIDIA GeForce RTX 3060 GPU (whose theoretical computing power is B FLOPS), and H+B>10 6 , then the platform preliminarily meets the requirements in terms of computing performance.
[0114] For memory requirements, compare the platform's memory capacity and bandwidth to see if they meet the operator's requirements. If the average memory requirement of an operator is Y 2 (e.g. 2GB), peak memory requirement is Y 3 (For example, 3GB). If the memory capacity of a platform is 4GB and the memory bandwidth can meet the data read and write speed requirements during the operation of the operator (estimated through memory bandwidth test tools and experience), then the platform meets the conditions in terms of memory performance.
[0115] For storage requirements, check whether the platform's storage capacity is greater than the operator's storage requirement quantification value Y 4 (e.g. 800MB). If the storage capacity of the platform is 1TB, the storage requirement is met. For the runtime requirement, if the platform's hardware performance and software environment can ensure that under similar workloads, the runtime of other similar operators meets or exceeds the operator's runtime requirement quantified value Y 5 (e.g. 1 second), the platform is also considered to meet the requirements in terms of running time.
[0116] Furthermore, by matching the thresholds of various performance indicators, we screen out the platform resource combination that meets the operator performance requirements and determine it as the second test platform. We set a weight for each performance indicator (e.g., the performance weight is The memory performance weight is The storage performance weight is The running time weight is etc.), comprehensively consider the satisfaction degree of each performance indicator and calculate a comprehensive performance score: Among them, I(G τ ) represents the indicator function. If the platform meets the τth performance indicator requirement, then I(G τ )=1, otherwise I(G τ) = 0. The platform with the highest comprehensive performance score is selected as the second test platform.
[0117] By matching the thresholds of multiple performance indicators and comprehensively considering them, we can ensure that the selected test platform can better meet the performance requirements of the operator in all aspects, avoiding inaccurate test results or test failures caused by the satisfaction of a single performance indicator while other indicators are insufficient, and providing a comprehensive and stable performance testing environment.
[0118] Step 10125, match the format support of the input and output demand data of the operator portrait with the annotated platform resource pool to obtain the third test platform.
[0119] Specifically, the input and output requirement data in the operator profile include the input data type (such as integer, floating point, image data, text data, etc.), format (such as binary format, text format, specific image encoding format, etc.), data range (such as integer value range, image resolution range, etc.), output data structure (such as array, matrix, structure, etc.), precision (such as decimal places, significant figures, etc.) and possible abnormal output conditions (such as error code, error message, etc.). For the software dependency libraries and hardware devices in the annotated platform resource pool, check their support for input and output data formats. For example, if the operator needs to input a specific image encoding format (such as H.264 encoded video frames), check whether there is a video processing software library or hardware decoder in the platform resource pool that supports the image encoding format. If a software dependency library named "VideoCodec Lib" can support H.264 encoding decoding and processing, and the platform where it is located is equipped with corresponding hardware acceleration functions (such as GPU video decoding unit), then the platform meets the requirements in terms of input data format support. For output data, check whether the platform can correctly process and store the data structure and precision requirements of the operator output. For example, if the operator outputs a high-precision floating-point matrix, it is necessary to ensure that the platform's software environment (such as the floating-point processing capability of the programming language, the precision support of the relevant digital library) and hardware (such as the floating-point unit precision of the CPU) can meet the precision requirements of the output data, and can correctly store the output results in the specified storage device to avoid data loss or precision loss. By checking and matching the input and output requirements one by one, the platform resource combination that can meet the operator input and output requirements is screened out and determined as the third test platform.
[0120] Step 10126, determine the first test platform, the second test platform and the third test platform as multiple test platforms.
[0121] Specifically, after the matching process of the above three steps, the first test platform, the second test platform, and the third test platform that meet the operator function requirements, performance requirements, and input and output requirements are obtained respectively. The three platforms are integrated and deduplicated to obtain the final multiple test platforms. During the integration process, if some platforms meet multiple sets of requirements at the same time, these platforms are retained first, thereby providing a more comprehensive test environment.
[0122] In one embodiment, step 103, the step of training the use case generation model includes:
[0123] Obtain sample data, input the sample data into the pre-trained model, obtain the prediction results output by the pre-trained model; obtain the loss value according to the prediction results based on the loss function of the pre-trained model; adjust the optimization function in the pre-trained model based on the loss value; predict the prediction results of the sample data based on the adjusted pre-trained model until the three consecutive loss values output by the loss function are less than or equal to the preset threshold and the three consecutive loss values decrease in sequence, and obtain the target model. The pre-trained model can be a multi-layer perceptron MLP, a convolutional neural network CNN, a recurrent neural network RNN, etc.
[0124] During the entire training process of the use case generation model, by continuously adjusting the model parameters to minimize the loss function, the model can learn useful knowledge and patterns from the sample data, and finally obtain a target model that can accurately generate test cases, providing strong support for the compatibility testing of operators.
[0125] The optimization function of the use case generation model is:
[0126]
[0127] Among them, θ t represents the model parameters at time t; α represents the learning rate; L(θ) represents the loss function; Represents the gradient of the loss function with respect to the model parameters; β and γ both represent weight coefficients; m represents the consideration of the gradient information of the past few time steps, and is a small certificate, such as m = 3, which is used to calculate the historical gradient average term. A smaller m value can effectively utilize recent historical gradient information without excessively increasing the computational complexity, and avoid the adverse effects of too old gradient information on the current parameter update.
[0128] Figure 2 FIG. 1 is a schematic diagram of the structure of the automatic compatibility test system for multi-platform operators provided by the present invention. Figure 2As shown, the device includes: a portrait generation unit 10: used to construct an operator portrait of a target operator based on the target operator to be tested; the target operator includes any operator extracted from an operator library or an algorithm to be tested; a platform construction unit 20: used to construct an operator portrait based on the acquired target operator to be tested, and to construct a test combination platform based on the operator portrait; the target operator includes any operator extracted from an operator library or an algorithm to be tested; the test combination platform includes at least two groups of test platforms; a use case generation unit 30: used to input the target operator into a use case generation model to obtain a target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case; a testing unit 40: used to test the target combination platform based on the target test case to obtain a test result.
[0129] Figure 3 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3 As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communication interface 320 and the memory 330 communicate with each other through the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the compatibility automatic testing method for multi-platform operators, the method comprising: constructing an operator profile based on the acquired target operator to be tested, and constructing a test combination platform based on the operator profile; the target operator includes any operator extracted from the operator library or the algorithm to be tested; the test combination platform includes at least two groups of test platforms; the target operator is deployed in each test platform of the test combination platform to obtain the target combination platform; the target operator is input into the use case generation model to obtain the target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case; the compatibility test of the target combination platform is performed based on the target test case to obtain the test result.
[0130] In addition, the logic instructions in the above-mentioned memory 1030 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0131] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the automatic compatibility testing method for multi-platform operators provided by the above methods, and the method includes: constructing an operator portrait based on the acquired target operator to be tested, and constructing a test combination platform based on the operator portrait; the target operator includes any operator extracted from an operator library or an algorithm to be tested; the test combination platform includes at least two groups of test platforms; the target operator is deployed in each test platform of the test combination platform to obtain a target combination platform; the target operator is input into a use case generation model to obtain a target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case; and the target combination platform is subjected to a compatibility test based on the target test case to obtain a test result.
[0132] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the above-mentioned automatic compatibility testing methods for multi-platform operators, the method comprising: constructing an operator portrait based on the acquired target operator to be tested, and constructing a test combination platform based on the operator portrait; the target operator comprises any operator extracted from an operator library or an algorithm to be tested; the test combination platform comprises at least two groups of test platforms; the target operator is deployed in each test platform of the test combination platform to obtain a target combination platform; the target operator is input into a use case generation model to obtain a target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case; and the target combination platform is subjected to a compatibility test based on the target test case to obtain a test result.
[0133] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0135] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. An automatic compatibility testing method for multi-platform operators, characterized in that: The following steps are involved: An operator profile is constructed based on the acquired target operator to be tested, and a test combination platform is constructed based on the operator profile; the target operator includes any operator extracted from an operator library or an algorithm to be tested; the test combination platform includes at least two groups of test platforms; Deploy the target operator in each test platform of the test combination platform to obtain a target combination platform; Inputting the target operator into a use case generation model to obtain a target test case output by the use case generation model; The use case generation model is trained based on the label results of sample operators and their corresponding test cases; A compatibility test is performed on the target combination platform based on the target test case to obtain a test result.
2. The automatic compatibility testing method for multi-platform operators according to claim 1 is characterized in that: The constructing of an operator profile based on the acquired target operator to be tested includes: Determining a first profile based on operator characteristics of the target operator; the operator characteristics include functions, performance requirements, input and output data formats, dependencies, and historical compatibility of the operator; The development information and usage feedback information of the target operator are integrated with the first portrait to obtain a second portrait; The second portrait is structured and visually represented based on the knowledge graph to obtain the operator portrait.
3. The automatic compatibility testing method for multi-platform operators according to claim 2 is characterized in that: The step of performing structured storage and visual representation on the second portrait based on the knowledge graph to obtain the operator portrait includes: Determine the target operator in the second portrait as a core entity, determine the operator feature of the target operator as an independent entity, and construct a knowledge graph framework; Determining a relationship type based on the logical relationship between the independent entities; Based on the relationship type and the knowledge graph framework, construct a knowledge graph model; The knowledge graph model is stored in a graph database, each of the independent entities is stored as a node in the graph database, the attribute value corresponding to the independent entity is stored in the attribute field of the node in the form of a key-value pair, and the relationship between the independent entities is stored as an edge connecting the nodes, so as to obtain a knowledge graph of the second portrait The knowledge graph of the second portrait is visualized to obtain the operator portrait.
4. The automatic compatibility testing method for multi-platform operators according to claim 1 is characterized in that: The constructing of a test combination platform based on the operator portrait includes: Annotate the metadata of each hardware resource, operating system, and software dependency library in the platform resource pool to obtain the annotated platform resource pool; Matching the demand factors of the operator portrait with the annotated platform resource pool to obtain multiple test platforms; The multiple test platforms are configured to obtain the test combination platform.
5. The automatic compatibility testing method for multi-platform operators according to claim 4 is characterized in that: The demand elements include functional requirements, performance requirements, and input and output requirements; the demand elements based on the operator profile are matched with the annotated platform resource pool to obtain multiple test platforms, including: Extracting and transforming the functional requirement data of the operator portrait to obtain functional keywords; Semantically matching the functional keywords with the annotated platform resource pool to obtain a first test platform; Quantifying the performance requirement data of the operator portrait to obtain a quantified value; Perform threshold matching on the quantized value and the labeled platform resource pool to obtain a second test platform; Matching the input and output demand data of the operator portrait with the annotated platform resource pool in terms of format support to obtain a third test platform; The first test platform, the second test platform and the third test platform are determined as the multiple test platforms.
6. The automatic compatibility testing method for multi-platform operators according to claim 1 is characterized in that: The training steps of the use case generation model include: Acquire sample data, input the sample data into a pre-trained model, and obtain a prediction result output by the pre-trained model; obtain a loss value according to the prediction result based on the loss function of the pre-trained model; adjust the optimization function in the pre-trained model based on the loss value; predict the prediction result of the sample data based on the adjusted pre-trained model, until three consecutive sets of loss values output by the loss function are less than or equal to a preset threshold and three consecutive sets of loss values decrease successively, thereby obtaining a target model.
7. The automatic compatibility testing method for multi-platform operators according to claim 1 is characterized in that: The optimization function of the use case generation model is: Among them, θ t represents the model parameters at time t; α represents the learning rate; L(θ) represents the loss function; represents the gradient of the loss function with respect to the model parameters; β and γ both represent weight coefficients; m represents the gradient information considering the past few time steps.
8. The automatic compatibility test system for multi-platform operators is characterized by: The method for automatically testing compatibility of a multi-platform operator as claimed in any one of claims 1 to 7; the automatic testing system for automatically testing compatibility of a multi-platform operator comprises: A portrait generation unit: used to construct an operator portrait of a target operator to be tested based on the acquired target operator; the target operator includes any operator extracted from an operator library or an algorithm to be tested; A platform construction unit: used to construct an operator profile based on the acquired target operator to be tested, and to construct a test combination platform based on the operator profile; the target operator includes any operator extracted from an operator library or an algorithm to be tested; the test combination platform includes at least two groups of test platforms; A use case generation unit is used to input the target operator into a use case generation model to obtain a target test case output by the use case generation model; the use case generation model is trained based on the label results of the sample operator and its corresponding test case; Testing unit: used to test the target combination platform based on the target test case to obtain the test result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the automatic compatibility testing method for multi-platform operators as described in any one of claims 1 to 7 are implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the automatic compatibility testing method for multi-platform operators as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Performance test method and system for hardware acceleration equipment of graphics processor
CN120596321A
Distributed multi-version upgrading method and device, equipment and medium
CN121166173A