Using Neural Networks to Select Computational Kernel Variables

Ranking and selecting cores through deep neural networks solves the problem of selecting the best cores to maximize computing performance, achieving efficient computing performance and low resource consumption.

CN113011578BActive Publication Date: 2024-09-13NVIDIA CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011505953.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-12-20
Filing Date
2020-12-18
Publication Date
2024-09-13
Estimated Expiration
2040-12-18

AI Technical Summary

Technical Problem

When performing calculations on a matrix or a set of matrices, selecting appropriate cores to maximize computing performance is a challenge because existing techniques struggle to efficiently evaluate and select the best cores, resulting in poor performance.

Method used

Employs a deep neural network (DNN) to rank kernels based on input factors, determines the most relevant kernels through candidate kernel generators, filters, and rankers, and utilizes neural network training to predict the kernel's relevance score to select the best The kernel performs calculations.

Benefits of technology

It significantly reduces the calculation running time, improves the calculation performance, and effectively performs kernel selection, reducing the time and resource cost of DNN training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113011578B_ABST
    Figure CN113011578B_ABST
Patent Text Reader

Abstract

Disclosed are apparatus, systems, and techniques for selecting computational kernel variables using a neural network. In at least one embodiment, a neural network is trained and utilized to generate a kernel list so that (e.g., optimal) kernels can be identified. The neural network receives characteristics of an input matrix and determines a relevance score for a list of possible kernels. Based on the list of kernels sorted by relevance score, a kernel is selected from the list and used to perform the computation and provide a result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to selecting the best kernel to perform calculations on one or more sets of mathematical inputs (such as one or more matrices). For a given calculation, a variety of methods can be used to perform the operation. Generally, the performance of the method may depend on a variety of factors that affect the method's runtime. Therefore, selecting a kernel for a given set of constraints can greatly affect the performance of the application program requesting the operation. Background Art

[0002] When performing a calculation on a matrix or a set of matrices, many factors affect the time it takes to complete the calculation. Because multiple cores may be available to perform an operation, it is often difficult to evaluate which core to use to perform the operation. By selecting an inefficient core to perform the calculation, performance may be less than optimal. Therefore, selecting the best core is important to maximize the performance of the calculation. However, the time and resource costs of selecting a core must be minimized to prevent the selection process from taking up more time than the time saved by using a potentially suboptimal core. BRIEF DESCRIPTION OF THE DRAWINGS

[0003] Figure 1 An example environment is shown in which the embodiments described herein may be implemented;

[0004] Figure 2 shows an example data flow according to embodiments described herein;

[0005] Figure 3 shows an example environment in which the embodiments described herein may be implemented;

[0006] Figure 4 A flow chart illustrating one or more embodiments;

[0007] Figure 5 A flow chart illustrating one or more embodiments;

[0008] Figure 6 A system for training an image synthesis network that may be utilized is shown in accordance with at least one embodiment;

[0009] Figure 7 illustrates various layers of a statistical model that may be utilized according to at least one embodiment;

[0010] Figure 8 Inference and / or training logic according to at least one embodiment is shown;

[0011] Fig. 9 Inference and / or training logic is shown in accordance with at least one embodiment. DETAILED DESCRIPTION

[0012] When requesting a matrix calculation, the application may not understand the various kernels that can be used to perform the calculation. As used herein, a "kernel" refers to any low-level routine that performs mathematical calculations on input data. For a given operation, there may be multiple kernels to perform the operation, and each kernel can be written to optimize the performance of certain input data. For example, an application may need a general matrix multiplication (GeMM) without being interested in how the operation is performed. On the contrary, the application is only interested in performing the operation as quickly as possible. Since many operations may have multiple kernels that can be used to perform the operation, selecting the best kernel (the time required to select the best kernel is the least) can greatly reduce the running time of the requested calculation.

[0013] Because the performance of many kernels may be affected by various factors, a deep neural network can be trained to rank a set of kernels based on input factors. The input factors may include input matrices and / or characteristics of the hardware on which the kernels are being executed. The DNN can then provide a ranked list of kernels based on the likelihood of being the best kernel for the computation, and the computation can be performed using one of the kernels selected based on the ranked list.

[0014] However, while DNNs can improve the time it takes to select the best kernel to perform an operation, DNNs still require extensive training to accurately predict kernel relevance. Because training is a time and resource intensive process, the training data provided to DNNs should be limited to those training sets that are most important for training the DNN. Therefore, training DNNs presents its own problems related to selecting the right training data to generate. Because the input can be of any size (up to the upper limit of the hardware), generalizing to a meaningful training set presents a difficult problem.

[0015] Therefore, a DNN that accurately predicts the best kernel while still making the selection efficiently is of high advantage. Furthermore, the training inputs to the DNN must be selected so that the training is done efficiently while still maintaining accurate predictions by the DNN when operating. Therefore, in addition to the initial training set of input data, the predictions made by the DNN can be used to identify one or more input sets that are particularly difficult in predicting the computational kernels. The DNN can then be further trained using the generated training data that matches those trouble areas.

[0016] Figure 11 is an illustration of an example environment in which embodiments described herein may be implemented. The environment includes a kernel selection system 100, a neural network training system 120, a client application 130, and an application programming interface (API) 140. Application 130 may communicate with kernel selection system 100 via a network (e.g., the Internet, a local area network (LAN), and / or other network) using the API. API 140 allows application 130 to communicate with kernel selection system 100 without requiring application 130 to have knowledge of how kernel selection system 100 operates. Thus, application 130 may submit a request for a computation along with one or more parameters (e.g., input data for a kernel), and receive a result in response.

[0017] Database 102 includes multiple kernels that can be used to perform one or more operations requested by application 130 via API 140. Each kernel can be associated with a specific calculation and can be used with provided input data to produce a result. For example, a kernel stored in database 105 can be associated with a general matrix multiplication (GeMM) calculation. The GeMM kernel can then be utilized by an execution component such as kernel processor 104, which can utilize the GeMM kernel to perform the calculation. In some embodiments, database 102 can include multiple kernels for a given calculation. For example, database 102 can include kernels K1...K2 for performing GeMM calculations. n , each kernel uses a different method for producing the same result.

[0018] The kernel processor 104 is a component that executes a kernel to calculate a computational result for a given set of inputs. In some embodiments, the kernel processor 104 can be the same processor that is executing the kernel selection engine 100. In some embodiments, the kernel processor 104 and the processor that is executing the kernel selection engine 100 can both be separate processors and / or processors incorporated into the same system. For example, the kernel processor 104 can be a graphics processing unit (GPU) running on the same system as one or more separate processors that are executing the kernel selection engine 100.

[0019] The candidate kernel generator 106 determines one or more candidate kernels that can be utilized by the kernel processor 104 to determine the result calculation. The candidate kernel generator 106 identifies the kernels in the database 102 that can be used to perform the operation that has been received in the request and the characteristics of the input data. For example, one or more kernels can be limited to the size of the matrix that can be used as input to calculate the result, and / or one or more kernels can be specific to a specific calculation. Therefore, the candidate kernel generator 106 can determine a list of kernels stored in the database 102, which can be used to provide the result to the application 130.

[0020] Filter 108 removes from the list of candidate kernels any kernels that are impractical and / or impossible to execute given the particular constraints of the system. For example, filter 108 may identify hardware constraints of core processor 104 and determine that for a given kernel, core processor 104 does not have (or is unlikely to have) the resources to process a given input using that kernel. Therefore, filter 108 may remove that kernel from the list of candidate kernels so that the neural network does not process that kernel as a potential optimal kernel.

[0021] Once the list of candidate kernels is determined, the list and the input data are provided to the neural network 110. The neural network is trained to determine a relevance score for each kernel based on the list of candidate kernels, which relevance score predicts how a given kernel will perform calculations on the input data. The neural network can be trained by a training system 120 as further described herein.

[0022] A sorter 112 sorts the candidate kernels by relevance based on the output of the neural network. For example, for a given list of kernels with relevance scores, the sorter 112 can sort the list so that the first kernel in the list is the most relevant kernel for performing calculations on the input data. The selection engine 114 then selects a kernel from the sorted list, such as the kernel with the highest relevance score. The selected kernel is then provided to the kernel processor 104, which can perform calculations using the selected kernel and the input data. The results of the kernel processor 104 can then be provided to the application 130 via the API 140.

[0023] Reference Figure 2, a flow chart is provided that illustrates processing input data into a ranked list of kernels to perform a calculation. The application first provides input data to an API 202. The input data may include matrices, matrix sizes, and / or other inputs that describe the input matrix or calculation to be performed. In some embodiments, the calculation has already been performed. Therefore, a session cache 204 may be maintained that includes result calculations for matrices that have been provided within the session. By maintaining the cache, the results can be provided to the application immediately without performing additional calculations and / or using a neural network. In some embodiments, if precise results are required, the input may be provided to a high priority cache. According to such an embodiment, the high priority cache does not utilize a neural network when selecting a kernel, but directly provides a ranked list of kernels to the selection component 114 for processing by the kernel processor 104. Because the number of possible kernels is very large, the high priority cache may not include all possible kernels and may take more resources to execute than using a neural network. Therefore, the high priority cache may be utilized in limited situations where the neural network will not perform as required.

[0024] If neither cache is used to generate a ranked list of kernels, a list of kernels is generated. The generation of the candidate kernel list may be performed by a component that shares one or more characteristics with the candidate kernel generator 106. Once the candidate kernels are generated, the list is provided to a filter 210, which may remove any kernels that are impossible or impractical to execute given one or more constraints (e.g., hardware constraints of the executing processor). The filtered kernel list is then provided to a neural network 212. In some embodiments, the filtered kernel list may be provided to the neural network along with additional information (e.g., derived features characterizing the kernels and / or inputs, the computation being requested, and / or specific hardware specifications of the target execution hardware). The neural network generates a predicted ranking score or relevance score for each kernel. The resulting kernel list is then sorted 214, and a ranked kernel list 216 is generated. A selection component such as the selection component 114 may then utilize the ranked kernel list 216 to perform computations and provide results to an application.

[0025] Although utilizing a neural network to select kernels for performing computations can result in faster and more efficient performance, training the neural network must also be efficient given the limited resources and time required to successfully train the network. Furthermore, the trained neural network must be trained so that the results are generally accurate and result in correct generalizations to potential input data sets. For example, the input space for computations can be infinitely large because matrices of any size can be provided as inputs. Therefore, it is impossible to train a neural network on all possible inputs. Therefore, selecting the best training data or identifying the training data that has the greatest impact on training the neural network, as described herein, can reduce the cost of training the neural network while still resulting in a neural network that can efficiently rank kernels.

[0026] Figure 3 is an example environment that can be used to train a neural network to rank kernels to perform computations. The training system 300 can be used with Figure 1 The training system includes the same system as the training system 120 shown in FIG. Figure 1 In some embodiments, the training system 300 may include multiple core processors, each with different hardware specifications. For example, the cores may be executed on various processors, each with different behavioral characteristics, and the characteristics of the processors may be provided together with the input data, the calculation result information and / or other neural network inputs as training data for the neural network 304. The neural network 304 may be associated with Figure 1 The neural networks 110 are the same and / or share similar characteristics.

[0027] Input generator 306 generates matrix properties to be used as training inputs for neural network 304. Training inputs may include properties of one or more matrices that may be provided in a request to perform a mathematical operation. For example, properties of two matrices on which a general matrix multiplication (GeMM) may be performed may be generated. In some embodiments, input generator 306 may generate random matrix properties. However, as previously described, the input space is infinite. Therefore, in some embodiments, input generator 306 may receive inputs from one or more other components to better ensure that the generated inputs are important for training neural network 304.

[0028] The kernel database 308 includes a plurality of kernels, each of which can perform calculations on a set of input matrices. For each training input, each of the plurality of kernels stored in the kernel database 308 can be provided to the kernel processor 302 to perform the calculation. For example, the kernel database can include kernels K1...Kn, each of which can be provided to the kernel processor 302 (or to multiple kernel processors) to generate a result set. The result set can include information about executing the training input on the kernel processor 302. The result set can include, for example, processor information for each kernel executed on the processor, the runtime of the kernel, and / or the category of the training input.

[0029] The input class may include characteristics that identify a matrix as being part of a particular subspace within the space of possible inputs. For example, certain matrices may be difficult to model, which may constitute a class of matrices. In some embodiments, a class of matrices may be a subspace of matrices whereby small changes in the matrix result in significant changes in the optimal kernel for performing the calculation.

[0030] The relevance calculator 310 determines a relevance score for each kernel in the result set based on the kernel's run time while performing the matrix calculation. The relevance score can be, for example, a value between 0 and 1, where 1 indicates that the kernel is completely relevant and 0 indicates that the kernel is impossible. Therefore, a kernel with a relevance score of 0.25 may perform worse (e.g., have a longer run time) than a kernel assigned a relevance score of 0.75. The result set can then be ranked according to the relevance score for further processing.

[0031] The result set and training input may be provided to the neural network as training data. The neural network may then process the input to determine a predicted relevance score for each kernel, which may then be ranked as a predicted ranking of the kernels. In some embodiments, the training input and ranked result set may be provided with hardware behavior information indicating the processor used to perform the computation. Thus, when a computation is requested from the neural network 304, the hardware specification may be provided as input so that the neural network may account for hardware differences when generating a predicted list of kernels.

[0032] In some embodiments, additional training inputs may be generated based on the outputs of the neural network 304 during training. The additional inputs may be generated by the input generator 306 based on information related to the category of the input data. For example, the training inputs may be provided to the neural network for training, and the predicted kernel rankings may be compared to the actual rankings of the kernels. If the lists are different or differ by more than a threshold difference, the category of the training input may be determined, and a signal may be provided to the input generator 306 to generate additional training inputs related to the category. Thus, the additional training inputs may then be provided to the neural network 304 to help the neural network 304 reduce the difference between the actual ranked list and the predicted ranked list. By doing so, subsequent training inputs may be better adjusted to those situations where the training inputs most affect incorrect (or suboptimal) outputs.

[0033] In some embodiments, a list-based loss function can be used to determine the difference between the predicted list and the actual result list. For example, the Jensen-Shannon divergence and / or the symmetric Kullback-Liebler divergence can be used to determine the loss between the actual result and the predicted result. In the case where the loss is important for a class of matrices (e.g., the neural network performs poorly on a set of matrices), when the top predicted result does not match the actual top result kernel (or, for example, the actual best kernel is not within a threshold ranking at the top of the predicted result), additional training inputs to the neural network may include more training inputs for that class of matrices. This can include updating the weight factors of matrices for one or more categories so that the neural network will receive more training inputs for that category compared to other categories with lower weight factors in the training data.

[0034] In some embodiments, two or more training inputs belonging to the same category are identified. Each training input can be processed as described herein, and the accuracy of each prediction result can be determined. If the difference between the accuracy of the prediction result of one training input and the accuracy of the prediction result of one or more other prediction results is mathematically significant, additional training inputs of the same category can be generated and provided to the neural network as training inputs.

[0035] In some embodiments, the training inputs may be generated to ensure that the training data spans a significant portion of the training input space. For example, matrix sizes may be limited to a certain maximum size due to hardware limitations of the processor executing the kernel. Therefore, the training inputs for the neural network should include matrix sizes that match the possible inputs that may be received by the neural network for processing.

[0036] Reference Figure 4, a flow chart is provided that illustrates an example embodiment as described herein. Some embodiments may have more or fewer steps, and / or may perform one or more steps in a different order. Figure 4 The method shown can be used with Figures 1 to 3 The illustrated environments share one or more features of environments for execution as described herein.

[0037] In step 405, a request for matrix calculation is received. This can be done via, for example, Figure 1 The request may be received through an application programming interface (API) such as API 140 of the present invention. The request may include one or more matrices, the type of calculation to be performed, and / or other characteristics of the input matrix. In some embodiments, the application may request calculations from an API function library.

[0038] In step 410, characteristics of one or more matrices are provided to a trained neural network. The characteristics may include, for example, the dimensions of the input matrix, a representation of the matrix, and / or other characteristics describing the input. The neural network is trained to generate a ranked list of candidate kernels that can be used to perform matrix calculations. In some embodiments, the neural network may be trained using one or more embodiments described herein. For example, a neural network may be trained using a method such as Figure 3 The training system 300 is shown for training a neural network.

[0039] In step 415, the neural network generates a ranked list of kernels to perform the requested computation. For example, the neural network can determine a relevance score for each kernel in the kernel list. The relevance score can indicate how likely it is that the kernel is the best kernel to perform the computation. In step 420, the best kernel is selected. The best kernel can be, for example, the kernel assigned the highest relevance score by the neural network.

[0040] In step 425, the best kernel is used to generate a result. The result may be generated by a processor configured to perform matrix calculations. For example, the result may be generated by a processor that shares one or more characteristics with the core processor 104. In step 430, the result is provided in response to receiving the request. This may be done via a processor such as Figure 1 The result is provided by an API such as API 140.

[0041] refer to Figure 5 , a flow chart is provided that illustrates an example embodiment as described herein. Some embodiments may have more or fewer steps, and / or may perform one or more steps in a different order. Figure 5 The method shown can be used with Figure 1-Figure 3 The illustrated environments share one or more features of environments for execution as described herein.

[0042] In step 505, training inputs are generated. The training inputs may include characteristics of one or more matrices that may be provided in a request to perform a computation. The training inputs are generated to train a neural network to assign relevance scores to one or more kernels so that the best kernel can be selected. The matrices may be randomly generated and may be of random size. In some embodiments, the generated training inputs may be limited based on hardware limitations of one or more processors executing the one or more kernels to compute the results. For example, the training inputs may be composed of Figure 3 The input generator 306 of the component sharing one or more characteristics is generated. The input generator can determine the hardware specifications of the core processor 302 and limit the training input to matrices that are only within the capabilities of the core processor 302. In some embodiments, the training input can be generated based on one or more other constraints, as described herein.

[0043] In step 510, a result set is generated for the training input. The result set includes one or more kernels that can be used to perform calculations on the result set. For example, the result set may include a kernel that can be used to perform a general matrix multiplication. The processor can utilize each kernel to generate results, and the runtime for performing each calculation can be included in the result set. In step 515, a relevance score is assigned to each kernel in the result set, the relevance score indicating the performance quality of the kernel in performing the calculation. Therefore, a higher score can be assigned to a kernel with a faster runtime compared to a kernel with a slower execution speed. In step 520, the kernels can be ranked based on the runtime and / or the assigned relevance score.

[0044] In step 525, the training input and the relevance score are provided to the neural network for training. The neural network is trained to receive the characteristics of one or more matrices as input and generate a ranked list of kernels ranked by relevance score. In some embodiments, the neural network can be used to select the best kernel from the list of candidate kernels based on the input.

[0045] In some embodiments, the output of the neural network can be used to further generate training inputs. For example, in the event that the neural network does not select the best kernel, additional training inputs of similar categories to the inputs that led to suboptimal results can be generated. In some embodiments, one or more input categories can be assigned a weight that indicates how often training inputs from that category are provided to the neural network. Thus, when generating future training inputs, the training inputs can be limited to those that improve the performance of the neural network.

[0046] In some embodiments, a training input may be provided to a neural network, and the performance of the neural network in determining a kernel list may decrease (e.g., taking more time to make the list, predicting a worse kernel list than before training). In those cases, the state of the neural network may be reset to a pre-trained state, and the training input and / or the class of the training input may be removed from future training input generation.

[0047] Figure 6 An example system 600 that can be used to classify data or generate inferences in at least one embodiment is shown. In at least one embodiment, supervised training and unsupervised training can be used in at least one embodiment discussed herein. In at least one embodiment, a set of training data 602 (e.g., classified or labeled data) is provided as input to be used as training data. In at least one embodiment, the training data may include instances of at least one type of object for which the neural network is to be trained, and information identifying the type of object. In at least one embodiment, the training data may include a set of images, each image including a representation of an object type, wherein each image also includes or is associated with a label, metadata, classification, or other information identifying the type of object represented in the corresponding image. Various other types of data may also be used as training data, including text data, audio data, video data, and the like. In at least one embodiment, the training data 602 is provided as training input to a training manager 604. In at least one embodiment, the training manager 604 may be a system or service including hardware and software for training a neural network (or other model or algorithm, etc.), such as one or more computing devices executing a training application. In at least one embodiment, the training manager 604 receives an instruction or request indicating the type of model to be used for training. In at least one embodiment, the model can be any suitable statistical model, network or algorithm that can be used for such purpose, for example, it can include artificial neural network, deep learning algorithm, learning classifier, Bayesian network, etc. In at least one embodiment, the training manager 604 can select an initial model or other untrained model from an appropriate repository 606 and train the model using the training data 602 to generate a trained training model 608 (e.g., a trained deep neural network) that can be used to classify similar types of data or generate other such inferences. In at least one embodiment where training data is not used, an appropriate initial model can still be selected according to the training manager 604 to train the input data.

[0048] In at least one embodiment, the model can be trained in a variety of different ways, which can depend in part on the type of model selected. In at least one embodiment, a set of training data can be provided to a machine learning algorithm, where the model is a model artifact created by the training process. In at least one embodiment, each instance of the training data contains the correct answer (e.g., classification), which can be referred to as a target or target attribute. In at least one embodiment, the learning algorithm finds patterns in the training data that map the input data attributes to the target, the answer to be predicted, and outputs a machine learning model that captures these patterns. In at least one embodiment, the machine learning model can then be used to obtain predictions for new data for which the target is not specified.

[0049] In at least one embodiment, the training manager 604 can select from a group of machine learning models, including binary classification, multi-classification, and regression models. In at least one embodiment, the type of model to be used can depend at least in part on the type of target to be predicted. In at least one embodiment, a machine learning model for a binary classification problem can predict a binary outcome, such as one of two possible classifications. In at least one embodiment, a learning algorithm such as logistic regression can be used to train a binary classification model. In at least one embodiment, a machine learning model for a multi-class classification problem allows predictions to be generated for multiple categories, such as predicting one of more than two outcomes. Multinomial logistic regression can be useful for training multi-class models. Machine learning models for regression problems can predict numerical values. Linear regression is useful for training regression models.

[0050] In at least one embodiment, in order to train a machine learning model according to one embodiment, the training manager must determine the input training data source and other information, such as the name of the data attribute containing the target to be predicted, the required data conversion instructions, and training parameters to control the learning algorithm. In at least one embodiment, during the training process, the training manager 604 can automatically select an appropriate learning algorithm based on the type of target specified in the training data source. In at least one embodiment, the machine learning algorithm can accept parameters for controlling the training process and certain properties of the resulting machine learning model. These are referred to as training parameters in this article. In at least one embodiment, if no training parameters are specified, the training manager can use known default values ​​to handle a wide range of machine learning tasks well. Examples of training parameters for which values ​​can be specified include maximum model size, maximum number of passes through the training data, random play type, regularization type, learning rate, and regularization amount. Default settings can be specified with options to adjust values ​​to fine-tune performance.

[0051] In at least one embodiment, the maximum model size is the total size, in bytes, of the patterns created during training the model. In at least one embodiment, by default, a model of a specified size may be created, such as a 100MB model. If the training manager cannot determine enough patterns to fill the model size, a smaller model may be created. If the training manager finds more patterns than can be accommodated by the specified size, the maximum cutoff may be achieved by trimming the patterns that have the least impact on the quality of the learned model. Selecting the model size controls the tradeoff between the predictive quality and cost of using the model. In at least one embodiment, a smaller model may cause the training manager to remove many patterns to fit within the maximum size limit, thereby affecting the quality of the predictions. In at least one embodiment, a larger model may be more expensive to query for real-time predictions. In at least one embodiment, a larger input data set does not necessarily result in a larger model because the model stores the patterns rather than the input data. In at least one embodiment, if the patterns are few and simple, the resulting model will be small. Input data with a large number of original attributes (input columns) or derived features (output of data transformations) may find and store more patterns during the training process.

[0052] In at least one embodiment, the training manager 604 may perform multiple passes or iterations on the training data to try to discover patterns. In at least one embodiment, there may be a default number of passes, such as ten passes, and in at least one embodiment, a maximum number of passes may be set, such as up to one hundred passes. In at least one embodiment, there may be no maximum set, or there may be a convergence criterion or other set of factors that trigger the end of the training process. In at least one embodiment, the training manager 604 may monitor the quality of the pattern during training (such as for model convergence) and may automatically stop training when there are no more data points or patterns to discover. In at least one embodiment, a data set with only a small number of observations may require more passes on the data to obtain a sufficiently high model quality. Larger data sets may contain many similar data points, which can reduce the need for a large number of passes. The potential impact of selecting more data passes on the data is that model training may take longer and cost more in terms of resources and system utilization.

[0053] In at least one embodiment, the training data is shuffled before training or between training passes. In at least one embodiment, the shuffle is a random or pseudo-random shuffle used to generate a truly random ordering, although there may be appropriate constraints to ensure that there are no groupings of certain types of data, or if there are such groupings, the shuffled data can be reshuffled, etc. In at least one embodiment, the shuffle changes the order or arrangement of the data used for training so that the training algorithm does not continuously encounter similar types of data or groupings of a single type of data for too many observations in a row. In at least one embodiment, the model can be trained to predict objects. In at least one embodiment, before uploading, the data may be sorted by object type. Then, in at least one embodiment, the algorithm can process the data alphabetically by object type, first encountering only data of a specific object type. In at least one embodiment, the model will begin to learn patterns for that type of object. Then, in at least one embodiment, the model will only encounter data of the second object type and will try to adjust the model to fit that object type, which may degenerate the pattern that fits the first object type. This sudden switch between object types may produce a model that cannot learn how to accurately predict the object type. In at least one embodiment, shuffling can be performed in at least one embodiment before the training data set is divided into training and evaluation subsets, thereby utilizing a relatively uniform distribution of data types for both phases. In at least one embodiment, the training manager 604 can automatically shuffle the data using, for example, a pseudo-random shuffling technique.

[0054] In at least one embodiment, when creating a machine learning model, in at least one embodiment, the training manager 604 can enable a user to specify settings or apply customization options. In at least one embodiment, a user can specify one or more evaluation settings that indicate a portion of the input data to be retained for evaluating the predictive quality of the machine learning model. In at least one embodiment, a user can specify a policy that indicates which attributes and attribute transformations can be used for model training. In at least one embodiment, a user can also specify various training parameters that control the training process and certain properties of the resulting model.

[0055] In at least one embodiment, once the training manager determines that model training is complete, such as by using at least one final criterion discussed herein, the trained model 608 can be provided for use by the classifier 614 to classify the validation data 612 (or otherwise generate inferences). In at least one embodiment, this involves a logical transition between the training mode of the model and the inference mode of the model. However, in at least one embodiment, the trained model 608 will first be passed to the evaluator 610, which may include an application, process, or service executed on at least one computing resource (e.g., a CPU or GPU of at least one server) for evaluating the quality (or other aspects) of the training model. In at least one embodiment, the model is evaluated to determine whether the model will provide at least a minimum acceptable or threshold performance when predicting targets for new and future data. If not, the training manager 604 can continue to train this model. In at least one embodiment, since future data instances will typically have unknown target values, it may be desirable to check the accuracy metric of machine learning on data with known target answers and use the evaluation as a proxy for the prediction accuracy of future data.

[0056] In at least one embodiment, a model is evaluated using a subset 602 of the training data provided for training. The subset can be determined using the shuffling and splitting method described above. This evaluation data subset will be labeled with a target, so it can serve as a source of ground truth for evaluation. In at least one embodiment, it is useless to use the same data used for training to evaluate the predictive accuracy of a machine learning model, because a positive evaluation may be generated for a model that memorizes the training data, rather than generalizing it. In at least one embodiment, once training is completed, the evaluation data subset is processed using the trained model 608, and an evaluator 610 can determine the accuracy of the model by comparing the ground truth data with the corresponding output (or predicted / observed value) of the model. The evaluator 610 in at least one embodiment can provide a summary or performance metric that indicates how well the predicted value matches the true value. In at least one embodiment, if the trained model does not meet at least a minimum performance standard or other such accuracy threshold, the training manager 604 can be instructed to conduct further training, or in some cases, try to train a new or different model. In at least one embodiment, if the trained model 608 meets the relevant criteria, the trained model can be provided for use by the classifier 614.

[0057] In at least one embodiment, when creating and training a machine learning model, it may be desirable to specify model settings or training parameters in at least one embodiment that will result in a model that is able to make accurate predictions. In at least one embodiment, the parameters include the number of passes to be performed (forward and / or backward), regularization or refinement, model size, and shuffle type. In at least one embodiment, selecting the model parameter settings that produce the best predictive performance on the evaluation data may result in overfitting the model. In at least one embodiment, overfitting occurs when the model stores patterns that appear in the training and evaluation data sources, but fails to generalize patterns in the data. Overfitting often occurs when the training data includes all the data used in the evaluation. In at least one embodiment, a model that has been overfitted may perform well during evaluation, but may not make accurate predictions on new data or other validation data. In at least one embodiment, in order to avoid selecting an overfitted model as the best model, the training manager may retain other data to verify the performance of the model. For example, the training data set can be divided into 60% for training and 40% for evaluation or validation, which can be divided into two or more stages. In at least one embodiment, after selecting the model parameters that best fit the evaluation data, resulting in convergence on a subset of the validation data (e.g., half of the validation data), a second validation can be performed using the remaining validation data to ensure the performance of the model. If the model meets the expectations of the validation data, the model will not overfit the data. In at least one embodiment, a test set or a reserved set can be used to test the parameters. In at least one embodiment, using a second validation or test step helps to select appropriate model parameters to prevent overfitting. However, taking out more data from the training process for validation will make the data available for training less. For smaller data sets, this may be a problem because there may not be enough data available for training. In at least one embodiment, a method in this case is to perform cross validation, as described elsewhere herein.

[0058] In at least one embodiment, there are a number of metrics or insights that can be used to review and evaluate the predictive accuracy of a given model. In at least one embodiment, an example evaluation result includes a predictive accuracy metric and a visualization, the predictive accuracy metric to report the overall success of the model; and a visualization to help explore the accuracy of the model beyond the predictive accuracy metric. The results can also provide the ability to see the impact of setting score thresholds (such as binary classification) and can generate alerts on criteria to check the effectiveness of the evaluation. The choice of metrics and visualizations can depend at least in part on the type of model to be evaluated.

[0059] In at least one embodiment, once the trained machine learning model has been satisfactorily trained and evaluated, it can be used to build or support a machine learning application. In one embodiment, building a machine learning application is an iterative process involving a series of steps. In at least one embodiment, a core machine learning problem can be constructed based on what is observed and the answers that the model is to predict. In at least one embodiment, the data can then be collected, cleaned, and prepared to make it suitable for use by the machine learning model training algorithm. This data can be visualized and analyzed for integrity checks to verify the quality of the data and understand the data. The original data (e.g., input variables) and the answer data (e.g., targets) may not be represented in a way that can be used to train a highly predictive model. Therefore, it may be desirable to build a more predictive input representation or feature from the original variables. The resulting features can be input into a learning algorithm to build a model and evaluate the quality of the model based on the data retained from the model construction. The model can then be used to generate predictions of the target answer for new data instances.

[0060] In at least one embodiment, Figure 6 In the example system 600 of , after evaluation, the trained model 610 is provided to or made available to a classifier 614, which is capable of using the trained model to process validation data. For example, in at least one embodiment, this may include data received from a user or an unclassified third party, such as query images, which are seeking information about what is represented in these images. In at least one embodiment, the validation data can be processed by the classifier using the trained model, and the resulting results 616 (such as classifications or predictions) can be sent back to the corresponding source or otherwise processed or stored. In at least one embodiment, and where such use is permitted, these now classified data instances can be stored to a training data repository, which can be used by a training manager for further training of the trained model 608. In at least one embodiment, the models will be continuously trained as new data becomes available, but in at least one embodiment, these models will be trained periodically, such as once a day or once a week, depending on factors such as the size of the data set or the complexity of the model.

[0061] In at least one embodiment, the classifier 614 may include appropriate hardware and software for processing the validation data 612 using the trained model. In at least one embodiment, the classifier will include one or more computer servers, each having one or more graphics processing units (GPUs) capable of processing data. In at least one embodiment, the configuration and design of the GPUs may make them more suitable for processing machine learning data than CPUs or other such components. In at least one embodiment, the trained model in at least one embodiment may be loaded into the GPU memory, and the received data instances are provided to the GPU for processing. The GPU may have many more cores than the CPU, and the CPU cores are also much more complex than the GPU cores. In at least one embodiment, a given GPU may be able to process thousands of data instances simultaneously through different hardware threads. In at least one embodiment, the GPU may also be configured to maximize floating point throughput, which can provide significant other processing advantages for large data sets.

[0062] In at least one embodiment, even when GPUs, accelerators, and other such hardware are used to accelerate tasks such as training models or using such models for data classification, such tasks may still require a lot of time, resource allocation, and cost. In at least one embodiment, if 600 passes are to be used to train a machine learning model, and the data set includes 1,000,000 data instances to be used for training, each path needs to process all millions of instances. Different parts of the architecture may also be supported by different types of devices. In at least one embodiment, a group of servers may be used at a logically centralized location to perform training, such as may be provided as a service, and the classification of raw data may be performed by such a service or on a client device and other such options. These devices may also be owned, operated, or controlled by the same entity or multiple entities.

[0063] In at least one embodiment, Figure 7The example neural network 700 shown in can be trained or otherwise utilized in at least one embodiment. In at least one embodiment, the statistical model is an artificial neural network (ANN) that includes multiple node layers, including an input layer 702, an output layer 706, and multiple layers 704 of intermediate nodes, commonly referred to as "hidden" layers, because the internal layers and nodes are generally not visible or accessible in the neural network. In at least one embodiment, although several intermediate layers are shown for explanation purposes only, it should be understood that there is no limit to the number of intermediate layers that can be utilized, and any limit on the layers will generally be a factor of the resources or time required for processing using the model. In at least one embodiment, other types of models, networks, algorithms, or processes can also be used because other numbers or selections of nodes and layers and other such options can be included. In at least one embodiment, the verification data can be processed by each layer of the network to generate a set of inferences or reasoning scores, which can then be fed to the loss function 708.

[0064] In at least one embodiment, all nodes of a given layer are interconnected to all nodes of adjacent layers. In at least one embodiment, the nodes of the intermediate layer will then be connected to the nodes of the two adjacent layers, respectively. In at least one embodiment, in some models, nodes are also referred to as neurons or connected units, and the connections between nodes are referred to as edges. Each node can perform a function for the received input, such as by using a specified function. In at least one embodiment, nodes and edges can obtain different weights during training, and various layers of nodes can perform specific types of transformations on the received input, where these transformations can also be learned or adjusted during training. In at least one embodiment, learning can be supervised learning or unsupervised learning, which may depend at least in part on the type of information contained in the training data set. In at least one embodiment, various types of neural networks can be utilized, such as a convolutional neural network (CNN) including multiple convolutional layers and a set of pooling layers, and various types of neural networks have been shown to be beneficial for applications such as image recognition. CNNs are also easier to train than other networks due to the relatively small number of parameters to be determined.

[0065] In at least one embodiment, various tuning parameters can be used to train such complex machine learning models. Selecting parameters, fitting models, and evaluating models are part of the model tuning process, commonly referred to as hyperparameter optimization. In at least one embodiment, such adjustments can include introspection of the underlying model or data. In a training or production environment, a robust workflow is very important to avoid overfitting of hyperparameters, as described elsewhere herein. Cross-validation and adding Gaussian noise to training data sets are useful techniques to avoid overfitting any one data set. It may be desirable to optimize hyperparameters to keep the training and validation sets fixed. In at least one embodiment, hyperparameters can be adjusted in certain categories because data preprocessing (e.g., translating words into vectors), CNN architecture definition (e.g., filter size, number of filters), stochastic gradient descent (SGD) parameters (e.g., learning rate), and regularization or refinement (e.g., signal loss probability) and other such options can be included.

[0066] In at least one embodiment, the instances of the data set can be embedded into a lower dimensional space of a specific size. During preprocessing, in at least one embodiment, the size of the space is a parameter to be adjusted. In at least one embodiment, the architecture of the CNN contains many adjustable parameters. The parameters of the filter size can represent the interpretation of the information corresponding to the size of the instance to be analyzed. In computational linguistics, this is called the n-gram size. The example CNN uses three different filter sizes, which represent the n-gram sizes that may be different. The number of filters for each filter size can correspond to the depth of the filter. Each filter attempts to learn something different from the instance structure, such as the sentence structure of text data. In the convolution layer, the activation function can be a rectified linear unit, and the pooling type is set to the maximum pool. The results can then be concatenated into a one-dimensional vector, and the last layer is fully connected to the two-dimensional output. This corresponds to a binary classification to which an optimization function can be applied. One such function is a root mean square (RMS) propagation method that implements gradient descent, where example hyperparameters can include learning rate, batch size, maximum gradient normal, and epoch. With neural networks, regularization can be a very important consideration. In at least one embodiment, the input data can be relatively sparse. In this case, the main hyperparameter might be the dropout of the penultimate layer, which means that a certain percentage of nodes will not "fire" each training cycle. The example training process can suggest different hyperparameter configurations based on feedback on the performance of previous configurations. The model can be trained using the suggested configuration, evaluated on the specified validation set, and a performance report is provided. This process can be repeated, such as to balance exploration (learn more about different configurations) and exploitation (leverage previous knowledge to get better results)

[0067] Since training CNNs can be parallelized and GPU-powered computing resources can be utilized, multiple optimization strategies can be tried for different scenarios. Complex scenarios allow tuning of the model architecture and preprocessing and stochastic gradient descent parameters. This expands the model configuration space. In the base case, only preprocessing and stochastic gradient descent parameters are tuned. In complex scenarios, more configuration parameters can be used than in the base scenario. Tuning of the joint space can be performed using linear or exponential steps and iterated through the optimization loop of the model. The cost of such a tuning process can be significantly lower than tuning processes such as random search and grid search without any noticeable performance loss.

[0068] In at least one embodiment, back propagation can be used to calculate the gradient for determining the weights of the neural network. Back propagation is a form of differentiation, as described above, the gradient descent optimization algorithm can use it to adjust the weights applied to various nodes or neurons. The weights can be determined using the gradient of the relevant loss function. Back propagation can use the derivative of the loss function with respect to the output generated by the statistical model. As described above, each node can have an associated activation function that defines the output of each node. Various activation functions can be used appropriately, such as radial basis functions (RBF) and sigmoid, which can be used for data conversion by various support vector machines (SVM). The activation function of the middle layer of the node is referred to as the inner product kernel in this article. These functions can include, for example, identification functions, step functions, S-shaped functions, ramp functions, etc. The activation function can also be linear or nonlinear, etc.

[0069] In at least one embodiment, an untrained neural network is trained using a training data set. In at least one embodiment, the training framework is a PyTorch framework, Tensorflow, Boost, Caffe, Microsoft Cognitive Toolkit / CNTK, MXNet, Chainer, Keras, Deeplearning4j, or other training framework. In at least one embodiment, the training framework trains an untrained neural network and enables it to be trained using the processing resources described herein to generate a trained neural network. In at least one embodiment, weights may be selected randomly or by using pre-training of a deep belief network. In at least one embodiment, training may be performed in a supervised, partially supervised, or unsupervised manner.

[0070] In at least one embodiment, an untrained neural network is trained using supervised learning, wherein the training data set includes inputs paired with expected outputs of the inputs, or wherein the training data set includes inputs with known outputs and the outputs of the neural network are manually graded. In at least one embodiment, the untrained neural network is trained in a supervised manner to process inputs from the training data set and compare the resulting outputs with a set of expected or desired outputs. In at least one embodiment, errors are then propagated back through the untrained neural network. In at least one embodiment, the training framework adjusts the weights that control the untrained neural network. In at least one embodiment, the training framework includes tools for monitoring the degree to which the untrained neural network converges toward a model (e.g., a trained neural network) that is suitable for generating correct answers (e.g., in results) based on known input data (e.g., new data). In at least one embodiment, the training framework repeatedly trains the untrained neural network while adjusting the weights using a loss function and an adjustment algorithm (such as a stochastic gradient descent algorithm) to refine the output of the untrained neural network. In at least one embodiment, the training framework trains the untrained neural network until the untrained neural network reaches the desired accuracy. In at least one embodiment, the trained neural network can then be deployed to implement any number of machine learning operations.

[0071] In at least one embodiment, an untrained neural network is trained using unsupervised learning, wherein the untrained neural network attempts to train itself using unlabeled data. In at least one embodiment, an unsupervised learning training data set will include input data without any associated output data or "ground truth" data. In at least one embodiment, the untrained neural network can learn groupings within the training data set and can determine how individual inputs relate to the untrained data set. In at least one embodiment, unsupervised training can be used to generate a self-organizing map, which is a trained neural network that is able to perform operations useful for reducing the dimensionality of new data. In at least one embodiment, unsupervised training can also be used to perform anomaly detection, which allows identification of data points in a new data set that deviate from the normal pattern of the new data set.

[0072] In at least one embodiment, semi-supervised learning can be used, which is a technique in which a mixture of labeled and unlabeled data is included in the training data set. In at least one embodiment, the training framework can be used to perform incremental learning, such as through transfer learning techniques. In at least one embodiment, incremental learning enables a trained neural network to adapt to new data without forgetting the knowledge injected into the network during initial training.

[0073] Figure 8Inference and / or training logic 815 is shown for performing reasoning and / or training operations associated with one or more embodiments. Figure 8 and Fig. 9 Provide details about the inference and / or training logic 815.

[0074] In at least one embodiment, the inference and / or training logic 815 may include, but is not limited to, code and / or data memory 801 to store forward and / or output weights and / or input / output data and / or other parameters used in aspects of one or more embodiments to configure neurons or layers of a neural network for training and / or for inference. In at least one embodiment, the training logic 815 may include or be coupled to a code and / or data memory 801 for storing graphics code or other software to control timing and / or sequence, into which weights and / or other parameter information is loaded to configure logic including integer and / or floating point units (collectively referred to as arithmetic logic units (ALUs)). In at least one embodiment, code such as graphics code loads weights or other parameter information into a processor ALU based on the architecture of the neural network corresponding to the code. In at least one embodiment, the code and / or data memory 801 stores weight parameters and / or input / output data for each layer of a neural network trained or used in conjunction with one or more embodiments during forward propagation of input / output data and / or weight parameters during training and / or inference using aspects of one or more embodiments. In at least one embodiment, any portion of code and / or data memory 801 may be included on on-chip or off-chip data memory, including a processor's L1, L2, or L3 cache or system memory.

[0075] In at least one embodiment, any portion of the code and / or data memory 801 may be internal or external to one or more processors or other hardware logic devices or circuits. In at least one embodiment, the code and / or code and / or data memory 801 may be a cache memory, a dynamic random addressable memory ("DRAM"), a static random addressable memory ("SRAM"), a non-volatile memory (e.g., flash memory), or other memory. In at least one embodiment, the code and / or code and / or data memory 801 is a choice of whether it is internal or external to the processor, for example, consisting of DRAM, SRAM, flash memory, or some other storage type, depending on the available storage on-chip versus off-chip, the latency requirements of the training and / or inference functions being performed, the batch size of the data used in the inference and / or training of the neural network, or some combination of these factors.

[0076] In at least one embodiment, the inference and / or training logic 815 may include, but is not limited to, code and / or data memory 805 for storing backward and / or output weights and / or input / output data corresponding to neurons or layers trained and / or used for inference in aspects of one or more embodiments of the neural network. In at least one embodiment, the code and / or data memory 805 stores weight parameters and / or input / output data for each layer of the neural network trained or used in conjunction with one or more embodiments during training and / or inference during input / output data and / or weight parameter backward propagation using aspects of one or more embodiments. In at least one embodiment, the training logic 815 may include or be coupled to a code and / or data memory 805 for storing graphics code or other software to control timing and / or sequence, weights and / or other parameter information will be loaded into it to configure logic including integer and / or floating point units (collectively referred to as arithmetic logic units (ALUs)). In at least one embodiment, code such as graphics code loads weights or other parameter information into a processor ALU based on the architecture of the neural network corresponding to the code. In at least one embodiment, any portion of the code and / or data memory 805 may be included with other on-chip or off-chip data memory, including the processor's L1, L2, or L3 cache or system memory. In at least one embodiment, any portion of the code and / or data memory 805 may be internal or external to one or more processors or other hardware logic devices or circuits. In at least one embodiment, the code and / or data memory 805 may be a cache memory, DRAM, SRAM, non-volatile memory (e.g., flash memory), or other storage device. In at least one embodiment, the choice of whether the code and / or data memory 805 is internal or external to the processor, for example, whether it is composed of DRAM, SRAM, flash memory, or other storage types, depends on the available storage on-chip or off-chip, the latency requirements of the training and / or inference functions being performed, the batch size of the data used in the inference and / or training of the neural network, or some combination of these factors.

[0077] In at least one embodiment, code and / or data memory 801 and code and / or data memory 805 may be separate storage structures. In at least one embodiment, code and / or data memory 801 and code and / or data memory 805 may be the same storage structure. In at least one embodiment, code and / or data memory 801 and code and / or data memory 805 may be partially the same storage structure and partially separated storage structure. In at least one embodiment, any portion of code and / or data memory 801 and code and / or data memory 805 may be included with other on-chip or off-chip data memory, including the processor's L1, L2 or L3 cache or system memory.

[0078] In at least one embodiment, the inference and / or training logic 915 may include, but is not limited to, one or more arithmetic logic units (“ALUs”) 910 including integer and / or floating point units to perform logic and / or arithmetic operations based at least in part on or as directed by training and / or inference code (e.g., graphics code), the results of which may produce activations (e.g., output values ​​from a layer or neuron within a neural network) stored in activation memory 920 as a function of input / output and / or weight parameter data stored in code and / or data memory 901 and / or code and / or data memory 905. In at least one embodiment, the activations stored in activation memory 920 are generated based on linear algebra and / or matrix-based mathematics performed by ALU 910 in response to executing instructions or other code, wherein weight values ​​stored in code and / or data memory 905 and / or code and / or data memory 901 are used as operands along with other values ​​(e.g., bias values, gradient information, momentum values, or other parameters or hyperparameters), any or all of which may be stored in code and / or data memory 905 or code and / or data memory 901 or other on-chip or off-chip memory.

[0079] In at least one embodiment, one or more ALUs 910 are included in one or more processors or other hardware logic devices or circuits, while in another embodiment, one or more ALUs 910 may be external to the processor or other hardware logic device or circuit (e.g., a coprocessor) that uses them. In at least one embodiment, ALUs 910 may be included within the execution unit of the processor, or otherwise included in a set of ALUs accessible to the execution unit of the processor, which may be within the same processor or distributed between different processors of different types (e.g., central processing unit, graphics processing unit, fixed function unit, etc.). In at least one embodiment, code and / or data memory 901, code and / or data memory 905, and activation memory 920 may be on the same processor or other hardware logic device or circuit, while in another embodiment, they may be in different processors or other hardware logic devices or circuits, or in some combination of the same and different processors or other hardware logic devices or circuits. In at least one embodiment, any portion of activation memory 920 may be included with other on-chip or off-chip data memory, including the processor's L1, L2, or L3 cache or system memory. Additionally, inference and / or training code may be stored with other code accessible to a processor or other hardware logic or circuitry and may be retrieved and / or processed using the processor's fetch, decode, schedule, execute, exit, and / or other logic circuitry.

[0080] In at least one embodiment, activation memory 920 may be a cache memory, DRAM, SRAM, non-volatile memory (e.g., flash memory), or other memory. In at least one embodiment, activation memory 920 may be completely or partially within or external to one or more processors or other logic circuits. In at least one embodiment, the activation memory 920 is a choice of whether it is internal or external to the processor, for example, or is composed of DRAM, SRAM, flash memory, or some other storage type, depending on the available on-chip storage, the latency requirements for performing training and / or inference functions, the batch size of data used in inferring and / or training neural networks, or some combination of these factors. In at least one embodiment, Figure 8 The inference and / or training logic 915 shown in FIG. 1 may be implemented with an application specific integrated circuit (“ASIC”) (e.g., an ASIC from Google). Processing unit from Graphcore TM Inference Processing Unit (IPU) from Intel (e.g., "LakeCrest") processor). In at least one embodiment, Figure 8The illustrated inference and / or training logic 915 may be used in conjunction with central processing unit (“CPU”) hardware, graphics processing unit (“GPU”) hardware, or other hardware such as a field programmable gate array (“FPGA”).

[0081] Fig. 9 Inference and / or training logic 915 is shown in accordance with at least one or more embodiments. In at least one embodiment, the reasoning and / or training logic 915 may include, but is not limited to, hardware logic, where computing resources are dedicated or otherwise dedicated to use in conjunction with weight values ​​or other information corresponding to one or more layers of neurons within a neural network. In at least one embodiment, Fig. 9 The inference and / or training logic 915 shown in FIG. 1 may be integrated with an application specific integrated circuit (ASIC) (e.g., Google's Processing unit, Graphcore TM Inference Processing Unit (IPU) from Intel (e.g., "Lake Crest") processor). In at least one embodiment, Fig. 9 The inference and / or training logic 915 shown can be used in conjunction with central processing unit (CPU) hardware, graphics processing unit (GPU) hardware, or other hardware (e.g., field programmable gate array (FPGA)). In at least one embodiment, the inference and / or training logic 915 includes, but is not limited to, code and / or data memory 901 and code and / or data memory 905, which can be used to store code (e.g., graphics code), weight values, and / or other information, including bias values, gradient information, momentum values, and / or other parameter or hyperparameter information. Fig. 9 In at least one embodiment shown in , each of code and / or data memory 901 and code and / or data memory 905 is associated with a dedicated computing resource (e.g., computing hardware 902 and computing hardware 906), respectively. In at least one embodiment, each of computing hardware 902 and computing hardware 906 includes one or more ALUs that perform mathematical functions (e.g., linear algebraic functions) only on information stored in code and / or data memory 901 and code and / or data memory 905, respectively, and the results are stored in activation memory 920.

[0082] In at least one embodiment, each of the code and / or data memories 901 and 905 and the corresponding computing hardware 902 and 906 corresponds to a different layer of the neural network, thereby providing activations obtained from one "storage / computation pair 901 / 902" of the code and / or data memory 901 and the computing hardware 902 as inputs to the "storage / computation pair 905 / 906" of the code and / or data memory 905 and the computing hardware 906, to mirror the conceptual organization of the neural network. In at least one embodiment, each storage / computation pair 901 / 902 and 905 / 906 can correspond to more than one neural network layer. In at least one embodiment, additional storage / computation pairs (not shown) can be included in the inference and / or training logic 915 after or in parallel with the storage / computation pairs 901 / 902 and 905 / 906.

[0083] Other variations are within the spirit of the present disclosure. Thus, while the disclosed technology is susceptible to various modifications and alternative constructions, certain illustrated embodiments thereof are shown in the drawings and have been described in detail above. However, it should be understood that there is no intention to limit the invention to one or more specific forms disclosed, but on the contrary, it is intended to cover all modifications, alternative constructions, and equivalent forms that fall within the spirit and scope of the present disclosure, as defined by the appended claims.

[0084] The use of the terms "a", "an", and "the" and similar references in the context of describing the disclosed embodiments (particularly in the context of the appended claims) should be interpreted as covering the singular and the plural, unless otherwise stated herein or clearly contradicted by the context and without individual definitions of the terms. Unless otherwise indicated, the terms "include", "have", "include", and "contain" should be interpreted as open-ended terms (i.e., meaning "including but not limited to"). The term "connected" (unmodified and referring to a physical connection) should be understood to be fully or partially contained in, attached to, or connected together, even if something intervenes. References to numerical ranges herein are intended to be used as a shorthand method only, unless otherwise stated herein, and each individual value falling within the range is referred to separately, and each individual value is incorporated into the specification as if it were individually referenced herein. The use of the term "set" (e.g., "a set of items)" or "subset" should be interpreted as a non-empty set containing one or more members, unless otherwise stated or contradicted by the context. Furthermore, unless otherwise indicated or contradicted by context, the term "subset" of a corresponding set does not necessarily mean a proper subset of the corresponding set, but the subset and the corresponding set may be equivalent.

[0085] Connective language, such as phrases of the form "at least one of A, B, and C" or "at least one of A, B, and C," unless expressly stated otherwise or clearly contradicted by context, may be used as commonly understood with context to present an item, clause, or the like, which may be A or B or C, or any non-empty subset of the set of A and B and C. For example, in the illustrative example of a set having three members, the connective phrases "at least one of A, B, and C" and "at least one of A, B, and C" refer to any of the following sets: {A}, {B}, {C}, {A, B}, {A, C}, {B, C}, {A, B, C}. Thus, such connective language is not generally intended to imply that certain embodiments require at least one A, at least one B, and at least one C, each of which is used for presentation. In addition, unless expressly stated otherwise or contradicted by context, the term "plurality" indicates a plural state (e.g., "plurality of items" means a plurality of items). The number of items in "plurality" is at least two, but may be more when expressly or by context indicates. Further, the phrase "based on" means "based at least in part on" rather than "based solely on" unless stated otherwise or clear from context.

[0086] The operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or clearly contradicted by context. In one embodiment, processes such as those described herein (or variations and / or combinations thereof) are performed by hardware or a combination thereof under the control of one or more computer systems, one or more computer systems being configured with executable instructions and implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed together on one or more processors. In one embodiment, the code is stored on a computer-readable storage medium in the form of a computer program that includes a computer program of multiple instructions that can be executed by one or more processors. In one embodiment, the computer-readable storage medium is a non-transitory computer-readable storage medium that does not include transient signals (e.g., propagated transient electrical or electromagnetic transmissions) but includes non-transitory data storage circuits (e.g., buffers, caches, and queues) within a transceiver of transient signals. In one embodiment, code (e.g., executable code or source code) is stored on a set of one or more non-transitory computer-readable storage media having executable instructions stored thereon (or other memory to store executable instructions) that, when executed by one or more processors of a computer system (i.e., as a result of being executed), cause the computer system to perform the operations described herein. In one embodiment, the set of non-transitory computer-readable storage media includes a plurality of non-transitory computer-readable storage media, and one or more individual non-transitory storage media of the plurality of non-transitory computer-readable storage media lack all of the code, while the plurality of non-transitory computer-readable storage media collectively store all of the code. In one embodiment, the executable instructions are executed so that different instructions are executed by different processors - for example, a non-transitory computer-readable storage medium stores instructions, and a main CPU executes some instructions, while a graphics processor unit executes other instructions. In one embodiment, different components of the computer system have independent processors, and different processors execute different subsets of instructions.

[0087] Thus, in one embodiment, a computer system is configured to implement one or more services that individually or collectively perform the operations of the processes described herein, and such a computer system is configured with applicable hardware and / or software that enables the execution of the operations. In addition, a computer system implementing an embodiment of the present disclosure is a single device, and in another embodiment, is a distributed computer system that includes multiple devices that operate in different ways, such that the distributed computer system performs the operations described herein, and such that a single device does not perform all operations.

[0088] Unless otherwise required, the use of any and all examples or exemplary language (e.g., "such as") provided herein is intended only to better illustrate embodiments of the invention and is not intended to limit the scope of the invention. Language in this specification should not be construed as indicating that any non-claimed element is essential to the practice of the invention.

[0089] All references, including publications, patent applications, and patents, cited herein are hereby incorporated by reference to the same extent as if each reference were individually and specifically indicated to be incorporated by reference and were set forth in its entirety herein.

[0090] In the specification and claims, the terms "coupled" and "connected" and their derivatives may be used. It should be understood that these terms may not be intended as synonyms for each other. On the contrary, in specific examples, "connected" or "coupled" may be used to indicate that two or more elements are in direct or indirect physical or electrical contact with each other. "Coupled" may also mean that two or more elements are not in direct contact with each other, but still cooperate or interact with each other.

[0091] Unless otherwise indicated, it should be understood that throughout the specification, terms such as "processing", "computing", "calculating", "determining", etc. refer to the actions and / or processes of a computer or computing system or similar electronic computing device that operates on and / or transforms data (e.g., electronic) represented as physical quantities (e.g., electronic) in the registers and / or memories of the computing system into other data similarly represented as physical quantities in the memory, registers or other such information storage, transmission or display devices of the computing system.

[0092] In a similar manner, the term "processor" may refer to any device or part of a device that processes electronic data from registers and / or memory and converts the electronic data into other electronic data that can be stored in registers and / or memory. As a non-limiting example, a "processor" may be a central processing unit (CPU) or a graphics processing unit (GPU). A "computing platform" may include one or more processors. As used herein, a "software" process may include, for example, software and / or hardware entities that perform work over time, such as tasks, threads, and intelligent agents. Similarly, each process may refer to multiple processes to execute instructions sequentially or in parallel, continuously or intermittently. The terms "system" and "method" are used interchangeably herein to the extent that the system may embody one or more methods and the method may be considered a system.

[0093] In this document, reference may be made to obtaining, acquiring, receiving or inputting analog or digital data into a subsystem, a computer system or a computer-implemented machine. The process of obtaining, acquiring, receiving or inputting analog and digital data may be accomplished in a variety of ways, such as by receiving data as a parameter of a function call or a call to an application programming interface. In some embodiments, the process of obtaining, acquiring, receiving or inputting analog or digital data may be accomplished by transmitting data via a serial or parallel interface. In another embodiment, the process of obtaining, acquiring, receiving or inputting analog or digital data may be accomplished by transferring data from a providing entity to an acquiring entity via a computer network. Reference may also be made to providing, outputting, transmitting, sending or presenting analog or digital data. In various examples, the process of providing, outputting, transmitting, sending or presenting analog or digital data may be accomplished by transmitting data as an input or output parameter of a function call, a parameter of an application programming interface or an inter-process communication mechanism.

[0094] Although the above discussion sets forth example implementations of the described technology, other architectures may be used to implement the described functionality and are intended to be within the scope of the present disclosure. In addition, although specific responsibilities are defined above for discussion purposes, various functions and responsibilities may be allocated and divided in different ways depending on the circumstances.

[0095] Furthermore, although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described. Rather, the specific features and acts are disclosed as exemplary forms of implementing the claims.

Claims

1. A processor, include: One or more arithmetic logic units (ALUs) configured to perform matrix calculations by: receiving a request for the matrix calculation, the request comprising at least one matrix and the matrix calculation to be performed; providing the candidate kernel list and the characteristics of the at least one matrix and the matrix calculation to a neural network; generating a ranked list of kernels using the neural network based at least in part on the list of candidate kernels, the ranking being based on a relevance score for each kernel in the ranked list of kernels determined using the neural network; selecting a first kernel from the ranked list of kernels; generating a result of the matrix calculation using the at least one matrix and the first kernel; as well as The results are provided.

2. The processor according to claim 1, The candidate kernel list is generated based on the at least one matrix and the matrix calculation, wherein the generated ranked kernel list includes only kernels included in the candidate kernel list.

3. The processor of claim 1 , wherein the one or more ALUs are further configured to perform the matrix calculations by: identifying a core processor configured to generate the result; One or more cores are removed from the candidate core list based on one or more hardware constraints of the core processor. The processor according to claim 1 , wherein the request is received through an application program interface (API).

5. The processor of claim 1 , wherein the one or more ALUs are further configured to perform the matrix calculations by: Identify hardware behavior information; and The hardware behavior information is provided to the neural network having characteristics of the at least one matrix and the matrix calculations.

6. The processor of claim 1, wherein the matrix calculation is a general matrix multiplication (GeMM).

7. The processor of claim 1 , wherein the one or more ALUs are further configured to perform the matrix calculations by: determining a second kernel for the at least one matrix and the matrix calculation; comparing, by the neural network, the ranked list of kernels to the second kernel; and Additional training data for the neural network is generated based on the at least one matrix and the second kernel.

8. The processor of claim 7, wherein the additional training data is generated include: determining a category of the at least one matrix; generating input based on the categories; as well as The additional training data is provided to the neural network.

9. A system, include: One or more processors configured to use one or more neural networks to perform: receiving a request for a matrix calculation, the request comprising at least one matrix and the matrix calculation to be performed; providing the candidate kernel list and the characteristics of the at least one matrix and the matrix calculation to a neural network; generating a ranked list of kernels using the neural network based at least in part on the list of candidate kernels, the ranking being based on a relevance score for each kernel in the ranked list of kernels determined using the neural network; selecting a first kernel from the ranked list of kernels; generating a result of the matrix calculation using the at least one matrix and the first kernel; as well as providing said results; as well as One or more memories for storing parameters corresponding to the one or more neural networks.

10. The system according to claim 9, The candidate kernel list is generated based on the at least one matrix and the matrix calculation, wherein the generated ranked kernel list includes only kernels included in the candidate kernel list.

11. The system of claim 9, wherein the processor is further configured to perform: identifying a core processor configured to generate the result; One or more cores are removed from the candidate core list based on one or more hardware constraints of the core processor.

12. The system of claim 9, wherein the processor is further configured to perform: Identify hardware behavior information; and The hardware behavior information is provided to the neural network having characteristics of the at least one matrix and the matrix calculations.

13. The system of claim 9, wherein the processor is further configured to perform: determining a second kernel for the at least one matrix and the matrix calculation; comparing, by the neural network, the ranked list of kernels to the second kernel; and Additional training data for the neural network is generated based on the at least one matrix and the second kernel.

14. The system of claim 13, wherein the processor is further configured to perform: determining a category of the at least one matrix; generating input based on the categories; and The additional training data is provided to the neural network.

15. A computer readable storage medium having a set of instructions stored thereon, which when executed by one or more processors causes the one or more processors to at least provide a request for a matrix calculation, the request comprising at least one matrix and the matrix calculation to be performed, the request being provided to a system configured to perform the following steps: providing the candidate kernel list and the characteristics of the at least one matrix and the matrix calculation to a neural network; generating a ranked list of kernels using the neural network based at least in part on the list of candidate kernels, the ranking being based on a relevance score for each kernel in the ranked list of kernels determined using the neural network; selecting a first kernel from the ranked list of kernels; generating a result of the matrix calculation using the at least one matrix and the first kernel; as well as The result is provided in response to the request.

16. The computer-readable storage medium of claim 15, wherein the request is provided via an application programming interface (API).

17. The computer-readable storage medium of claim 15, wherein the matrix calculation is a general matrix multiplication (GeMM).

18. The computer-readable storage medium of claim 15, wherein the instructions further comprise instructions for: determining a second kernel for the at least one matrix and the matrix calculation; comparing, by the neural network, the ranked list of kernels to the second kernel; and Additional training data for the neural network is generated based on the at least one matrix and the second kernel.

19. The computer-readable storage medium of claim 15, wherein the instructions further comprise instructions for: determining a category of the at least one matrix; and The request is provided to the class.

20. The computer-readable storage medium of claim 19, wherein the instructions further comprise instructions for: Identify hardware behavior information; and The hardware behavior information is provided to the neural network having characteristics of the at least one matrix and the matrix calculations.