Providing an optimized service-based pipeline
The solution addresses the lack of runtime visibility in computing systems by using runtime utilization metrics and policies to optimize workload allocation across GPUs, ensuring efficient resource use and maintaining user experience.
Patent Information
- Application Number
- JP2024519003
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2021-09-28
- Filing Date
- 2022-09-23
- Publication Date
- 2024-09-20
AI Technical Summary
Existing computing systems lack visibility into the runtime behavior of processing resources, leading to potential oversubscription of GPUs and suboptimal workload allocation, which can degrade user experience, especially in battery-powered devices.
A mechanism for workload allocation recommendations based on runtime utilization metrics and policies, using an API to determine optimal placement of workloads across integrated and discrete GPUs, considering factors like power consumption, performance, and resource availability.
Ensures efficient utilization of processing resources, preventing oversubscription and maintaining expected user experience by making informed workload allocation decisions.
Smart Images

Figure 2024534641000001
Abstract
Description
[Background technology]
[0001] A computing system often includes several processing resources (e.g., one or more processors) that can fetch and execute instructions and store the results of the executed instructions in appropriate locations. Applications executing on such computer systems can be given the opportunity to select a particular processing resource to execute a particular workload. For example, in a computing system that includes a central processing unit (CPU) and one or more accelerated processing devices, such as a graphics processing unit (GPU), an application can select a particular processor to execute the application's workload. An application can determine which processing resources are present in a computing system by querying the computing system's operating system. In one example, a multimedia playback application can query the operating system for a list of devices capable of media playback and select, for example, a particular GPU to execute a video playback workload. [Brief description of the drawings]
[0002] [Figure 1] FIG. 1 is a block diagram of an example system for providing an optimized service-based pipeline, in accordance with some embodiments of the present disclosure. [Diagram 2] FIG. 1 is a flow diagram illustrating an example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. [Diagram 3] FIG. 1 is a flow diagram illustrating an example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. [Figure 4]FIG. 1 is a flow diagram illustrating an example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. [Diagram 5] FIG. 11 is a flow diagram illustrating another example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. [Figure 6] FIG. 11 is a flow diagram illustrating another example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. [Figure 7] FIG. 11 is a flow diagram illustrating another example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. [Figure 8] FIG. 11 is a flow diagram illustrating another example method for providing an optimized service-based pipeline, according to some embodiments of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0003] In some scenarios, when an application is ready to assign a workload for execution, the application may first query the operating system to determine what processing resources are available. For example, if the workload is a graphics workload (e.g., graphics rendering of a game) or a multimedia workload (e.g., multimedia playback), the application may first determine whether a GPU is present in the computing device. In some computing devices, more than one GPU may be present. For example, a computing device may include an integrated CPU and GPU, while also including a discrete GPU (i.e., on a separate chip). Furthermore, the application may determine, for example, which video codecs are supported by the GPU to determine where to place the workload. For example, a streaming media service player may describe a particular workload (e.g., a movie) in terms of source resolution, bit rate, codec, display resolution, frame rate, etc., and query the operating system for processing resources that can execute the workload. The operating system may respond by identifying a GPU that has the capability to execute the workload. Based on the operating system's response, the application may select a GPU and assign the workload to that GPU. For example, an application may assign a workload to an integrated GPU because an integrated GPU typically consumes less power than a discrete GPU, which may be of particular concern when a computing device is running on battery power.
[0004] However, when the operating system provides information about the capabilities of the computing device, it does so without any insight into the runtime behavior of the system. That is, the operating system does not know how busy the video codec of the integrated GPU is. If an application decides to put a workload on the integrated GPU that may also be running other video workloads, such as a video conferencing application, the video codec of the integrated GPU may become oversubscribed. In other words, the application and the operating system have no visibility into the actual runtime utilization of the processing resources and, as a result, do not know whether the computing device can deliver the expected user experience for the workload.
[0005] To address these limitations, the present disclosure provides a mechanism for an optimized service-based pipeline in which an application or other workload initiator can receive workload allocation recommendations based on runtime utilization metrics and policies for a workload before allocating processing resources to the workload.
[0006] Embodiments are directed to a method of providing an optimized service-based pipeline. The method includes receiving a request from a workload initiator, the request including a description of a workload. The method also includes examining run-time utilization metrics of a plurality of processing resources based on the workload description, the plurality of processing resources including at least a first GPU and a second GPU. The method also includes determining a workload allocation recommendation based on the utilization metrics and one or more policies. In some embodiments, the first GPU is an integrated GPU integrated with a CPU, and the second GPU is a discrete GPU. In some embodiments, the plurality of processing resources for which utilization metrics are identified further include at least one of a video encoding / decoding accelerator, an audio encoding / decoding accelerator, a display controller, a bus interface controller, and a memory subsystem controller.
[0007] In some embodiments, the method includes exposing an application programming interface (API) to the workload initiator for submitting the request. In these embodiments, the method includes providing a workload assignment recommendation to the workload initiator in response to the request. In some embodiments, the method includes identifying runtime utilization metrics and one or more policies based on at least the description of the workload.
[0008] In some embodiments, determining the workload assignment recommendation based on the utilization metrics and the one or more policies includes predicting a utilization impact on a plurality of processing resources for a particular workload assignment based on the runtime utilization metrics. In these embodiments, the plurality of workload assignments may be described in one or more policies. These embodiments may also include scoring the plurality of workload assignments based on one or more factors specified in the one or more policies.
[0009] In some embodiments, the method includes registering a workload initiator for resource management notifications and notifying the workload initiator of resource availability in response to changes in capacity or changes in utilization.
[0010] A variation of the embodiment is directed to an apparatus for providing an optimized service-based pipeline, the apparatus including a computer processor and a computer memory operatively coupled to the computer processor, the computer memory having computer program instructions therein that, when executed by the computer processor, cause the apparatus to receive a request from a workload initiator, the request including a description of a workload. The computer program instructions also cause the apparatus to examine run-time utilization metrics of a plurality of processing resources based on the workload description, where the plurality of processing resources includes at least a first GPU and a second GPU. The computer program instructions further cause the apparatus to determine a workload allocation recommendation based on the utilization metrics and one or more policies.
[0011] In some embodiments, determining a workload assignment recommendation based on the utilization metrics and the one or more policies includes predicting utilization impacts on a plurality of processing resources for a particular workload assignment based on the runtime utilization metrics. In these embodiments, the plurality of workload assignments are described in one or more policies. In some embodiments, the computer program instructions cause the apparatus to score the plurality of workload assignments based on one or more factors specified in the one or more policies.
[0012] In some embodiments, the computer program instructions cause the device to register a workload initiator for resource management notifications and notify the workload initiator of resource availability in response to changes in capacity or changes in utilization.
[0013] Yet another variation of the embodiment is directed to a computer program product for providing an optimized service-based pipeline. The computer program product is provided on a computer-readable storage medium and includes computer program instructions that, when executed, cause a computer to receive a request from a workload initiator, the request including a description of a workload. The computer program instructions also cause the computer to examine runtime utilization metrics of a plurality of processing resources based on the workload description, where the plurality of processing resources includes at least a first GPU and a second GPU. The computer program instructions also cause the computer to determine a workload allocation recommendation based on the utilization metrics and the one or more policies.
[0014] In some embodiments, determining a workload assignment recommendation based on the utilization metrics and the one or more policies includes predicting utilization impacts for a plurality of processing resources for a particular workload assignment based on run-time utilization metrics. In these embodiments, the plurality of workload assignments may be described in one or more policies. In some embodiments, determining a workload assignment recommendation based on the utilization metrics and the one or more policies is performed atomically for a plurality of streams in a workload. In these embodiments, the computer program instructions cause the apparatus to score the plurality of workload assignments based on one or more factors specified in the one or more policies.
[0015] In some embodiments, the computer program instructions cause the computer to register the workload initiator for resource management notifications and notify the workload initiator of resource availability in response to changes in capacity or changes in utilization.
[0016] The embodiments according to the present disclosure are described in more detail from FIG. 1. Throughout the specification and drawings, the same reference numerals refer to the same elements. FIG. 1 shows a block diagram of an exemplary system 100 for providing an optimized service-based pipeline according to some embodiments of the present disclosure. The exemplary system 100 of FIG. 1 can be implemented in a computing device such as a laptop or desktop personal computer, a server, a mobile device such as a smartphone or tablet, a game console, etc. The exemplary system 100 includes two GPUs 104, 134, but those skilled in the art will understand that other systems can include more GPUs or use other types of accelerated processing devices without departing from the spirit of the present disclosure.
[0017] In the embodiment of FIG. 1, the exemplary system 100 includes an accelerated processing unit (APU) that integrates a CPU 106 and a GPU 104 (referred to herein as an “integrated GPU”). The CPU 106 and the integrated GPU 104 may be implemented on the same chip and, as a result, may share some components and interfaces. For example, the CPU and GPU may share a system memory 160, a memory controller 114, a direct memory addressing (DMA) engine 118, a bus interface such as a personal computing interface express (PCIe) interface 116, and other interfaces and adapters not shown in FIG. 1, including a network interface, a universal serial bus (USB) interface, a persistent storage interface, and the like. The CPU 106 includes one or more cores 108 (i.e., execution engines), a cache structure (not shown), pipeline components (not shown), and the like. The CPU 106 and other shared components are connected to the GPU 104 via a high-speed on-chip communication fabric (not shown).
[0018] In the example system 100 of FIG. 1, the integrated GPU 104 includes a GPU compute engine 110 that includes multiple single instruction multiple data (SIMD) processing cores 112 with several parallel processing units (not shown). The GPU compute engine 110 may also include other components not shown in FIG. 1, such as a geometry processor, a rasterizer, a graphics command processor, a hardware scheduler, an asynchronous compute engine, caches, data sharing, etc. In the example of FIG. 1, the integrated GPU 104 also includes hardware accelerators in the form of application specific integrated circuits or functional logic blocks, such as a video encoder / decoder 120 (i.e., a "codec") for accelerated video encoding and decoding, an audio codec 122 for accelerated audio encoding and decoding, a display controller 124 for accelerated display processing, and a security processor 126 for accelerated security protocol implementation and compliance.
[0019] In the example of FIG. 1, APU 102 communicates with discrete GPU 134 via an interconnect, such as PCIe interconnect 190. PCIe interface 116 of APU 102 and PCIe interface 146 of discrete GPU 134 communicate via PCIe interconnect 190. In some examples, APU 102 and discrete GPU 134 may be implemented on the same circuit board (e.g., printed circuit board). In another example, discrete GPU 134 may be implemented on a video or graphics card separate from the circuit board of APU 102. APU 102 and discrete GPU 134 may implement a secure communication protocol over PCIe interconnect 190 to share sensitive data, such as protected video content.
[0020] Similar to the integrated GPU 104, the discrete GPU 134 of the example of FIG. 1 includes a GPU execution engine 140 that includes multiple SIMD processing cores 142 with many parallel processing units (not shown). The GPU execution engine 140 may include other components not shown in FIG. 1, such as a geometry processor, a rasterizer, a graphics command processor, a hardware scheduler, an asynchronous compute engine, caches, data sharing, etc. In the example of FIG. 1, the discrete GPU 134 also includes hardware accelerators in the form of application specific integrated circuits or functional logic blocks, such as a video encoder / decoder 150 (i.e., a "codec") for accelerated video encoding and decoding, an audio codec 152 for accelerated audio encoding and decoding, a display controller 154 for accelerated display processing, and a security processor 156 for accelerated security protocol implementation and compliance. The discrete GPU 134 also includes a memory controller 144 and a DMA engine 148 for accessing a graphics memory 180. In some examples, the memory controller 144 and the DMA engine 148 are configured to access a shared portion of the system memory 160 .
[0021] In the example system 100 of FIG. 1 , system memory 160 (e.g., dynamic random access memory (DRAM)) hosts an operating system 164 that interfaces with device drivers 166 for the processing resources described above (i.e., the APU and discrete GPU and their constituent components). System memory 160 also hosts one or more applications 162. In the context of this disclosure, the one or more applications may be graphics applications, multimedia applications, video editing applications, video conferencing applications, high performance computing applications, machine learning applications, or other applications that leverage the parallelism and / or graphics and video capabilities of integrated GPU 104 and discrete GPU 134. The one or more applications 162 generate workloads (e.g., graphics rendering workloads, audio / video transposition workloads, media playback workloads, machine learning workloads, etc.) that are assigned to integrated GPU 104 or discrete GPU 134 (or a combination of both) via calls to operating system 164. Those skilled in the art will appreciate that the one or more applications may be a variety of additional application types that generate a variety of workload types, not all of which are identified herein, however, specific references to application types and workload types within this disclosure should not be construed as limiting the application types and workload types to those identified herein.
[0022] System memory 160 also hosts a resource manager 170 that receives requests including descriptions of workloads from workload initiators, such as applications 162, examines run-time utilization metrics of multiple processing resources, including integrated GPU 104 and discrete GPU 134, and determines workload allocation recommendations based at least on the utilization metrics and one or more policies. In some examples, resource manager 170 is embodied in computer-executable instructions stored on a tangible computer-readable storage medium that, when executed by a processor, causes system 100 to perform the steps described above, as well as other steps and operations performed by the resource manager described below.
[0023] In some embodiments, the resource manager 170 includes an API 172 through which the application 162 can request a workload assignment recommendation from the resource manager 170 before the application assigns a workload to a particular GPU. In this context, a workload assignment recommendation is a recommendation regarding where (i.e., on which GPU) to place a workload (i.e., for execution of the workload). The workload assignment recommendation is based on, for example, a workload description, hardware capabilities such as processing resources in the system 100, availability of various processing resources in the system 100, utilization metrics of various processing resources in the system 100, and one or more policies related to the workload or type of workload. In some examples, the resource manager 170 includes a policy engine 174 that interprets one or more policies 176 related to determining an optimal allocation of a workload to the GPUs 104, 134 based on current values of runtime utilization metrics of the processing resources. The workload assignment recommendation is then returned to the application 162, which can use it to determine where to place the workload. In some examples, resource manager 170 may communicate with driver 166 to obtain the values of the utilization metrics, or may obtain the values of the utilization metrics through other mechanisms. In such examples, driver 166 may include a utilization monitor for a particular processing resource and an interface for providing the utilization metric values to resource manager 170. Additional details describing receiving a request including a description of a workload from a workload initiator, examining runtime utilization metrics of multiple processing resources including integrated GPU 104 and discrete GPU 134, determining workload allocation recommendations based at least on the utilization metrics and one or more policies, as well as other functions and advantages of resource manager 170 are provided below.
[0024] For further explanation, FIG. 2 shows a flow diagram illustrating an example method for providing an optimized service-based pipeline according to some embodiments of the present disclosure. The example method of FIG. 2 includes receiving 210 a request including a description of a workload from a workload initiator. In some examples, receiving 210 a request including a description of a workload from a workload initiator is performed by receiving a query as a call via an API that resource manager 170 exposes to the workload initiator. In examples where the workload includes video processing or graphics processing tasks, a computing system (e.g., system 100 of FIG. 1) that executes the workload may include multiple GPUs capable of executing the workload. In a particular example, the computing system includes an integrated GPU (e.g., integrated GPU 104 of FIG. 1) and a discrete GPU (e.g., discrete GPU 134 of FIG. 1). In such examples, the request from the workload initiator is a query to resource manager 170 as to whether the workload should be placed on the integrated GPU, the discrete GPU, or a combination thereof. In some cases, a workload may include work items that may run on an integrated GPU and other work items that may run simultaneously on a discrete GPU.
[0025] Various types of applications may be workload initiators, each having various types of workloads. In some examples, a request from a workload initiator describes a type of workload, workload characteristics, processing requirements, and / or performance expectations for the workload. For example, a media player application may have a workload identified as a media playback workload intended to be executed on a computing system. In such an example, the workload description includes source resolution, display resolution, bit rate, video codec, audio codec, and frame rate for the playback workload. As another example, a video conferencing application may have a workload identified as a transcoding workload intended to be executed on a computing system. In such an example, the workload description may include source video codec, target video codec, and frame rate. The video conferencing application may also include an artificial intelligence (AI) workload including AI algorithms for gaze correction or removing / replacing the background of an on-screen participant.
[0026] In some examples, the workload description is provided using a description language that can be parsed by the resource manager. For example, the description language can include bitrate descriptor tags, display resolution descriptor tags, video encoding protocol descriptor tags, etc. In these examples, the workload description is a structured description of the workload. In some examples, the description language included in the request can be parsed by policy engine 174 of resource manager 170, as described in more detail below.
[0027] The exemplary method of FIG. 2 includes examining 220 runtime utilization metrics of a plurality of processing resources based on the workload description. The processing resources include at least a first GPU and a second GPU. In some examples, examining 220 runtime utilization metrics is performed by a resource manager collecting metrics from the integrated GPU and the discrete GPU. The utilization of the integrated GPU and the discrete GPU can be expressed in various ways recognized by those skilled in the art. For example, the utilization metrics of the integrated GPU and the discrete GPU can include processor utilization as a ratio of idle time to busy time, as a number of active processes, as a number of active threads, as power consumption, or a combination thereof. The integrated GPU and the discrete GPU can include various counters to provide these metrics. Metrics related to busy vs. idle can also take into account clock rate. For example, computational power can be related to throughput per clock, number of engines, and / or clock rate. Throughput can vary depending on the workload. For example, scaling / tone mapping / color correction of high dynamic range video is a heavier workload per pixel when performed on one GPU than scaling / color correction of standard dynamic range material. However, that same workload may have significantly different cost functions when run on a different engine. As a result, clock rate and throughput per clock cycle may also be expressions of utilization metrics.
[0028] In some examples, the first GPU and its constituent resources (e.g., processing engines such as compute units, video codecs, audio codecs, display engines, etc.) and the second GPU and its constituent resources (e.g., processing engines such as compute units, video codecs, audio codecs, display engines, etc.) can be considered as a pool of resources, and the individual resources of each GPU can be partitioned to support workloads. That is, one or more processing engines can be associated with a single workload. For example, a decoding workload can be split across a video codec of the first GPU and a video codec of the second GPU. Thus, the processing resources can be general computational resources, such as integrated or discrete GPUs, or specific computational resources, such as codecs, shaders, display engines, etc.
[0029] In some examples, examining 220 runtime utilization metrics of a plurality of processing resources may also include collecting runtime utilization metric values from additional processing resources including multimedia accelerators such as video and audio codecs, display controllers, security processors, memory subsystems such as DMA engines and memory controllers, and bus interfaces such as PCIe interfaces. Utilization of multimedia accelerators, display controllers, security processors, and other accelerators may be represented by metrics such as idle time to busy time ratio, number of active processes, number of active threads, power consumption, or combinations thereof. These components may include various counters to provide these metrics, which may be examined, for example, via calls to corresponding drivers. Memory subsystem utilization may be represented by metrics such as the number of read and write packets issued through the interface in a current period, current utilization of ingress and egress queues or buffers, data transfer times and latencies. Bus interface utilization may be represented by metrics such as bandwidth (e.g., peak bandwidth and average bandwidth). In particular, utilization of the bus interface between the APU and the discrete GPU is important when the workload is split between the integrated and discrete GPUs, and the bandwidth of the bus interface imposes constraints on the ability of the integrated and discrete GPUs to share result data.
[0030] In some examples, examining 220 runtime utilization metrics of the plurality of processing resources based on the workload description is performed by the resource manager querying the drivers of each of the plurality of processing resources to obtain runtime utilization metrics before the workload is started. For example, in response to a request from a workload initiator including a description of a workload, the resource manager determines the particular components (e.g., compute units, shaders, codecs, etc.) of the processing resources required to support execution of the workload based on the workload description. The resource manager then queries the drivers of each of the plurality of processing resources for utilization metrics to build utilization states of the computing devices related to the workload that may be allocated on those processing resources. For example, if the workload description indicates that the workload is a media playback workload, the resource manager examines utilization metrics of video and audio codecs, among others, to build utilization states related to the media playback workload.
[0031] The example method of FIG. 2 includes determining 230 a workload allocation recommendation based on utilization metrics and one or more policies. In some examples, determining 230 a workload allocation recommendation is performed by a resource manager determining, based at least on utilization of the computing device and its constituent processing resources, to which processing resources or combinations of processing resources the workload can be assigned such that those resources are not oversubscribed. In these examples, the resource manager identifies available processing resources within the computing device and determines, based on a description of the workload, which of the processing resources can execute the workload. For example, based on available processing resources (e.g., in integrated and discrete GPUs) and their ability to meet the requirements of the workload (e.g., supported video encoding / decoding standards), the resource manager examines utilization of available and capable processing resources in determining 230 a workload allocation recommendation.
[0032] In these examples, determining 230 the workload allocation recommendation may also include determining a recommended placement of the workload based on one or more policies, provided such placement does not result in oversubscription of processing resources. As an example, the policy may state that the workload should be placed on the integrated GPU if possible because it will result in less overall power consumption by the APU to which the workload is added. As a result, if the new workload is not predicted to result in oversubscription of the integrated GPU, the workload allocation recommendation is that the workload be placed on the integrated GPU. In some examples, determining 230 the workload allocation recommendation is performed atomically for multiple streams in the workload. As a result, if there is a workload that includes multiple streams (e.g., a transcoding workload with a video encoding stream and a video decoding stream), the workload allocation recommendation is determined atomically for each stream in the workload. For example, a workload allocation recommendation may be made for a video encoding stream and a second workload allocation recommendation may be made for a video decoding stream of the same workload.
[0033] In some examples, determining 230 the workload allocation recommendation includes identifying a policy based on the type of workload to which the request pertains. Factors driving the policy can be other than power consumption. In some variations, the policy for a gaming workload is based on performance factors, where some processing resources perform tasks better than other processing resources. In one example, the policy may state that the gaming workload should be placed on the discrete GPU unless the gaming workload is predicted to result in oversubscription of the discrete GPU. In some variations, the policy is capability-based. For example, the policy may state that video playback should be performed using the AV1 codec. As an example, one of the GPUs may include an AV1 codec accelerator and the other does not. As a result, determining 230 the workload allocation recommendation may also include determining the capabilities of the processing resources available in the system. In some examples, the workload allocation may be overridden by the resource manager based on a new workload or updated utilization information.
[0034] In some embodiments, determining 230 a workload allocation recommendation may also include identifying component processing resources required by the workload and identifying utilization metrics for those resources. As an example, if the video codec of an integrated GPU is at high utilization, a graphics workload that does not utilize a video codec may be placed on the integrated GPU without resulting in oversubscription of resources. In contrast, a video playback workload that utilizes a video codec would result in oversubscription of the video codec. In this example, despite the low power consumption policy, the workload allocation recommendation would place the workload on a discrete GPU. As a result, if the addition of a workload would result in oversubscription of any component processing resource (e.g., video codec) of the processor system (e.g., integrated GPU), the resource manager determines that it is preferable to place the workload on another system (e.g., discrete GPU). In some examples, the policy may describe expectations for a type of workload. For example, a policy may indicate that a 4K high dynamic range (HDR) workload at 60 frames per second can be expected to consume N cycles and an amount M of memory bandwidth.
[0035] In some examples, the policy may state that the workload should be allocated to maximize utilization of both the integrated GPU and the discrete GPU. As an example, consider a video editing workload that may include multiple decode and encode streams. In such an example, the resource manager may determine that the first decode stream should be placed on the integrated GPU based on the availability of the integrated GPU, and the first encode stream should be placed on the discrete GPU based on the availability of the discrete GPU. For the second decode stream, the resource manager may determine that the second decode stream should be placed on the integrated GPU based on the utilization of the integrated GPU and the discrete GPU, and recommend this workload allocation. For the third decode stream, the resource manager may determine that the third decode stream should be placed on the discrete GPU based on the utilization of the integrated GPU and the discrete GPU, and recommend this workload allocation.
[0036] Considering the example workload of transcoding from a High Efficiency Video Coding (HEVC) format to an Advanced Video Coding (AVC) format, the resource manager may determine that the HEVC decoded stream should be placed on the integrated GPU based on availability, and this may be the workload allocation recommendation. For an AVC encoded stream, the resource manager may determine that the AVC encoded stream should be placed on the discrete GPU based on expected utilization, and this may be the workload allocation recommendation.
[0037] Consider an example workload of transcoding from AOMedia Video 1 (AV1) format to AVC format. In this example, the AV1 format is supported only by the discrete GPU. In such an example, the resource manager may determine, based on the capabilities of the system, that the AV1 decoded stream should be placed on the discrete GPU, which is the workload allocation recommendation. Based on the expected utilization, the resource manager may determine, based on the expected utilization, that the AVC encoded stream should be placed on the integrated GPU, which is the workload allocation recommendation.
[0038] For further explanation, FIG. 3 shows a flow diagram illustrating an example method for providing an optimized service-based pipeline according to some embodiments of the present disclosure. The method of FIG. 3 is similar to the method of FIG. 2, except that the example of FIG. 3 includes exposing 310 an application programming interface (API) to a workload initiator for submitting a request. In some embodiments, the resource manager exposes the API to applications (e.g., applications 162 of FIG. 1) that wish to execute a workload on the computing system. The API provides a mechanism for the application to submit a workload description (e.g., using the descriptor language described above) and request a recommendation for workload allocation among the processing resources of the computing system. In some variations, the descriptor is added as an argument to the API call. For example, before deciding whether to place a workload on an integrated or discrete GPU, the application can call the resource manager to request a recommendation for workload allocation. In the API call, the application can include a structured description of the workload using the descriptor language. By providing an API that allows a workload initiator to request workload allocation recommendations, the workload initiator is given the opportunity to use the runtime characteristics of integrated and discrete GPUs to identify where the workload can be placed without incurring performance degradation (e.g., by oversubscribing processing resources) rather than selecting a GPU for the workload regardless of current utilization. The API call is made by the application at the start of the workload (e.g., at the start of media playback initiation) and not for each work item in the workload (e.g., for each frame decode). In some examples, the first GPU and the second GPU may be abstracted such that the processing resources appear as a single system and the interface maps to multiple subsystems (e.g., codecs, compute units, etc.).
[0039] For further explanation, FIG. 4 shows a flow diagram illustrating an example method for providing an optimized service-based pipeline according to some embodiments of the present disclosure. FIG. 4 is similar to that of FIG. 2, except that it includes providing 410 a workload assignment recommendation to a workload initiator in response to a request. For example, the resource manager returns the workload assignment recommendation to the requesting application that initiated the request. In some examples, the result is returned as a response to an API call. The workload assignment recommendation indicates whether the workload should be placed on the integrated GPU or the discrete GPU. In some variations, the workload assignment recommendation indicates where a particular work item within a workload should be placed, such as some work items (e.g., compositing) should be placed on the integrated GPU while other work items (e.g., video decoding) should be placed on the discrete GPU. In some examples, a policy associated with the type of workload dictates how the resource manager should respond to the workload initiator. For example, a policy may indicate that if excessive utilization would result from placement on any GPU, the resource manager should return a response indicating the placement preferred by the policy, along with a warning that over-utilization may result. In some cases, the resource manager may return results indicating the predicted utilization impact for each GPU, so that an application can decide where to place a workload based on the predicted utilization impact.
[0040] For further explanation, FIG. 5 shows a flow diagram illustrating an example method for providing an optimized service-based pipeline according to some embodiments of the present disclosure. FIG. 5 includes identifying 510 runtime utilization metrics and one or more policies based at least on the workload description. In some examples, identifying 510 runtime utilization metrics and one or more policies based at least on the workload description is performed by a resource manager determining a type of workload from the workload description. From the type of workload, the resource manager can identify the processing resources required by the workload (e.g., shader engines, video or audio codec accelerators, memory subsystems or bus interfaces, etc.). Additionally or alternatively, the resource manager can identify the required processing resources from workload characteristics (e.g., video or audio encoding parameters, upscaling resolution parameters, security parameters, etc.) in a structured description of the workload. Based on the identified processing resources, the resource manager looks up utilization metrics for those resources. The utilization metrics for the processing resources can be continuously monitored and sampled or can be obtained in response to a request.
[0041] Based on the type of workload obtained from the workload description, one or more policies for the workload are also identified. For example, each type of workload (e.g., media playback, video editing, video conferencing, etc.) may have a set of policies associated with it. The set of policies describes to a policy engine (e.g., policy engine 174 of FIG. 1) how to make decisions for workload allocation recommendations. For example, the set of policies may specify preferences for where a workload or components of a workload should be placed, enumerated priorities for aspects of the workload (e.g., speed, power consumption, image quality, etc.), basic requirements for the workload (e.g., frame rate, latency, output resolution), critical resources for the workload (e.g., which resources are frequently utilized by the workload), security and protection policies, etc. In some examples, the set of policies may indicate which utilization metrics should be examined and trusted in determining workload allocation recommendations.
[0042] For further explanation, FIG. 6 shows a flow diagram illustrating an example method for providing an optimized service-based pipeline according to some embodiments of the present disclosure. In the example method of FIG. 6, determining a workload allocation recommendation 230 includes predicting 610 utilization impacts on a plurality of processing resources in a particular workload allocation based on runtime utilization metrics. In some embodiments, predicting 610 utilization impacts on a plurality of processing resources in a particular workload allocation is performed by a resource manager that identifies a particular workload allocation. For example, the particular workload assignment may be placement of the entire workload on an integrated GPU or on a discrete GPU, or distribution of the workload across integrated and discrete GPUs. For a particular workload assignment, based on the type of workload and the runtime utilization metrics, the resource manager predicts the utilization impacts of the processing resources in the proposed workload assignment. For example, based on the type of workload, the resource manager may determine that the GPU cores of the integrated GPU will be oversubscribed if a new workload is added. In some variations, the resource manager predicts the numerical impact of the new workload. For example, based on the type of workload, the resource manager may determine that if the workload is placed on the integrated GPU, utilization of the GPU cores of the integrated GPU will increase by 20%. In some variations, the impact on utilization may be predicted based on trends, models, and / or previous utilization observations of processing resources when executing a particular type of workload.
[0043] As mentioned above, the resource utilization analysis is not limited to a particular resource and can be applied to the entire system. Consider an example of a proposed workload allocation for a transcoding workload, where video decoding and compositing jobs can be placed on the video codec and shader engine of the discrete GPU, and video encoding jobs can be placed on the video codec of the integrated GPU. In this example, both GPUs can accommodate the workload without overutilization, but the transfer of configuration over the PCIe interconnect from the discrete GPU to the integrated GPU results in overutilization of this interface. Consider another example of video playback, where the playback workload can be accommodated by either the integrated or discrete GPU. However, since the integrated GPU competes with the CPU for access to system memory through the memory controller, placing the workload on the integrated GPU may result in too much latency to provide the desired user experience. In such a scenario, it may be desirable to place the workload on the discrete GPU, even though it consumes more power.
[0044] In some examples, one or more policies associated with a workload type specify multiple workload allocation proposals. In an example of a transcoding workload, the policy may specify as a first preference to place video decoding and compositing on the video codec and shader engine of the discrete GPU and video encoding on the video codec of the integrated GPU. The policy may specify as a second preference to place the entire workload on the discrete GPU. The policy may specify as a third preference to place the entire workload on the integrated GPU. In some variations, the policy may be overridden by resource constraints. For example, if any GPU does not support content protection and a video workload includes protected content, the workload must be placed on a GPU that supports content protection, even though the policy would place the workload on a GPU that does not support content protection.
[0045] For further explanation, FIG. 7 shows a flow diagram that extends the method shown in FIG. 6. After predicting the utilization impact of the plurality of particular workload assignments, the method of FIG. 7 continues with scoring 710 the plurality of workload assignments based on one or more factors specified in one or more policies. In some embodiments, scoring 710 the workload assignments is performed by a policy engine of the resource manager calculating scores for the plurality of possible workload assignments. The scores are calculated based on factors specified in the policy or set of policies. For example, the scores can be related to performance characteristics (e.g., output frame rate, output resolution, etc.) of the particular workload assignments, power consumption or efficiency factors, load balancing factors, etc. Continuing with the transcoding example above, the scores can be based on frame rate. Assume that a first workload assignment that places video decoding and compositing jobs on a discrete GPU and video encoding jobs on an integrated GPU can achieve a frame rate of 200 frames per second. The second workload assignment places the entire workload on the discrete GPU and can achieve a frame rate of 150 frames per second, and the third workload assignment places the entire workload on the integrated GPU and can achieve a frame rate of 100 frames per second. If these workload assignments were scored based on frame rate, as specified in the policy for the transcoding workload, the first workload assignment would be determined as the recommended workload assignment. However, in this same example, if the PCIe interface utilization was substantially higher, the transfer of data between the integrated and discrete GPUs could reduce the frame rate of the first workload assignment to 125 frames per second. In this example, based on a scoring system that uses only frame rate, the second workload assignment would be preferred.
[0046] In some variations, the factors used to score a particular workload assignment are weighted. Continuing with the transcoding example, the policy may weight the frame rate and the output resolution such that the frame rate is prioritized over the output resolution. In an example of high PCIe utilization, a frame rate of 200 frames per second may be achievable if the output resolution is reduced so that less data needs to be sent over the PCIe interface. In such a scenario, the second and third workload assignments are still limited by performing both encoding and decoding in the same system and cannot reduce the output resolution to improve this performance. However, the first workload assignment may reduce the output resolution to increase the data rate over the PCIe interface. As a result, if the frame rate is weighted higher than the output resolution, the first workload assignment will score higher than the other two.
[0047] In the above examples, the policy engine calculates a score for each workload assignment. These workload assignments may be specified in the policy itself, as described above. The workload assignment with the highest score is then identified by the resource manager to the workload initiator as the recommended workload assignment for the workload. In some examples, the score may include an indication as to whether the workload assignment results in an oversubscription of resources.
[0048] For further explanation, FIG. 8 shows a flow diagram illustrating an example method for providing an optimized service-based pipeline according to some embodiments of the present disclosure. The example method of FIG. 8 includes registering 810 a workload initiator for resource management notifications. In some embodiments, registering 810 a workload initiator for resource management notifications is performed by a resource manager receiving an indication that an application requests registration for resource management notifications. When registration for resource management notifications is requested, the resource manager notifies the application if there are changes to resource utilization or resource capabilities that may affect a previously recommended workload allocation. The application may request registration via an API call to the resource manager. In some variations, the application may request registration as part of the API call that makes the initial request for a workload allocation recommendation. In other examples, the application may request registration in a separate API call.
[0049] The example method of FIG. 8 includes notifying 820 a workload initiator of resource availability in response to at least one of a change in capacity and a change in utilization. In some embodiments, notifying 820 a workload initiator of resource availability in response to at least one of a change in capacity and a change in utilization is performed by a resource manager that detects a change in the capacity of a computing system or a utilization of computing resources. For example, the resource manager may detect that a competing application has terminated, thereby increasing the availability of processing resources. The resource manager may detect that a computing system has switched from battery power to connected power, thereby reducing the importance of a large power consumption of a discrete GPU. In response to detecting such a change, the resource manager notifies applications that have registered for such notifications. In some examples, the notification by the resource manager prompts the applications to submit a new request for a workload allocation recommendation. In other examples, the notification includes an updated workload allocation recommendation. In some examples, the resource manager detects whether applications are still active and have not crashed or shut down incompletely in order to release resources allocated to them.
[0050] In view of the above, the skilled reader will appreciate that some embodiments according to the present disclosure provide several advantages. The embodiments provide an application intending to start a workload on a multi-GPU system with visibility into the system's runtime behavior so that the application does not place the workload on over-utilized resources. Furthermore, policies for a feature / workload type provide definitions that enable the resource manager's policy engine to make optimal workload allocation recommendations for that feature / workload type. As a result, the system can ensure that the workload will run as expected, or the application is informed that performance cannot be guaranteed before starting the workload. In this manner, the user experience is improved.
[0051] The embodiments may be systems, devices, methods, and / or logic circuits. The computer-readable program instructions of the present disclosure may be either assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, such as object-oriented programming languages such as Smalltalk, C++, and traditional procedural programming languages such as the "C" programming language or similar programming languages. In some embodiments, electronic circuits including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer-readable program instructions by using the state information of the computer-readable program instructions.
[0052] Aspects of the present disclosure are described herein with reference to flowchart and / or block diagrams of methods, apparatus (systems) and logic circuitry according to some embodiments of the present disclosure. It will be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by logic circuitry.
[0053] The logic circuitry may be implemented in a processor, other programmable data processing apparatus, or other device and cause a sequence of operational steps to be executed on the processor, other programmable apparatus, or other device to produce a computer-implemented process, whereby the instructions executing on the computer, other programmable apparatus, or other device perform the functions / acts specified in the flowchart and / or block diagram blocks.
[0054] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and logic circuits according to various embodiments of the present disclosure. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions, including one or more executable instructions for performing a specified logical function. In some alternative embodiments, the functions described in the blocks may occur out of the order described in the figures. For example, two blocks shown in succession may in fact be executed substantially simultaneously, or the blocks may be executed in the reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system to perform the specified functions or acts, or by executing a combination of dedicated hardware and computer instructions.
[0055] Although the present disclosure has been specifically shown and described with reference to embodiments thereof, it should be understood that various changes in form and details may be made therein without departing from the spirit and scope of the following claims. Accordingly, the embodiments described herein are merely illustrative and not limiting of the present invention. The present disclosure is defined by the appended claims, rather than the detailed description, and all differences within the scope thereof should be construed as being included in the present invention.
Claims
1. 1. A method for providing a service-based pipeline, comprising: receiving a request from a workload initiator, the request including a description of a workload; examining runtime utilization metrics of a plurality of processing resources including at least a first graphics processing unit (GPU) and a second GPU; determining a workload allocation recommendation based on the utilization metrics and one or more policies. method.
2. The first GPU is an integrated GPU integrated with a central processing unit (CPU), and the second GPU is a discrete GPU.
2. The method of claim 1.
3. the plurality of processing resources include at least one of a video encoding / decoding accelerator, an audio encoding / decoding accelerator, a display controller, a bus interface controller, and a memory subsystem controller; 2. The method of claim 1.
4. exposing an application programming interface (API) to the workload initiator for sending the request; 2. The method of claim 1.
5. providing the workload allocation recommendation to the workload initiator in response to the request.
2. The method of claim 1.
6. identifying the runtime utilization metrics and the one or more policies based on at least the description of the workload.
2. The method of claim 1.
7. determining a workload allocation recommendation based on the utilization metrics and one or more policies; predicting a utilization impact for the plurality of processing resources for a particular workload assignment based on the runtime utilization metrics.
2. The method of claim 1.
8. the plurality of workload assignments are described in the one or more policies; The method of claim 7.
9. determining a workload allocation recommendation based on the utilization metrics and one or more policies; scoring the plurality of workload assignments based on one or more factors specified in the one or more policies. The method of claim 7.
10. registering the workload initiator for resource management notifications; notifying the workload initiator of resource availability in response to at least one of changes in capacity and changes in utilization.
2. The method of claim 1.
11. 1. An apparatus for providing a service-based pipeline, comprising: The apparatus comprises: A computer processor; a computer memory operably coupled to the computer processor; the computer memory includes computer program instructions; The computer program instructions, when executed by the computer processor, receiving a request from a workload initiator, the request including a description of a workload; examining runtime utilization metrics of a plurality of processing resources including at least a first graphics processing unit (GPU) and a second GPU; determining a workload allocation recommendation based on the utilization metrics and one or more policies; causing the device to execute Device.
12. determining a workload allocation recommendation based on the utilization metrics and one or more policies; predicting a utilization impact for the plurality of processing resources for a particular workload assignment based on the runtime utilization metrics.
12. The apparatus of claim 11.
13. the plurality of workload assignments are described in the one or more policies; 13. The apparatus of claim 12.
14. determining a workload allocation recommendation based on the utilization metrics and one or more policies; scoring the plurality of workload assignments based on one or more factors specified in the one or more policies.
13. The apparatus of claim 12.
15. The computer program instructions, when executed, registering the workload initiator for resource management notifications; notifying the workload initiator of resource availability in response to at least one of changes in capacity and changes in utilization; causing the device to execute 12. The apparatus of claim 11.
16. 1. A computer program product for providing a service-based pipeline, comprising: The computer program product is provided on a computer-readable storage medium, The computer program product includes computer program instructions: The computer program instructions, when executed, receiving a request from a workload initiator, the request including a description of a workload; examining runtime utilization metrics of a plurality of processing resources including at least a first graphics processing unit (GPU) and a second GPU; determining a workload allocation recommendation based on the utilization metrics and one or more policies; to cause a computer to execute Computer program products.
17. determining a workload allocation recommendation based on the utilization metrics and one or more policies; predicting a utilization impact for the plurality of processing resources for a particular workload assignment based on the runtime utilization metrics.
17. The computer program product of claim 16.
18. determining a workload allocation recommendation based on the utilization metrics and the one or more policies is performed atomically for multiple streams within a workload.
20. The computer program product of claim 17.
19. determining a workload allocation recommendation based on the utilization metrics and one or more policies; scoring the plurality of workload assignments based on one or more factors specified in the one or more policies.
20. The computer program product of claim 17.
20. The computer program instructions, when executed, registering the workload initiator for resource management notifications; notifying the workload initiator of resource availability in response to at least one of changes in capacity and changes in utilization; causing the computer to execute 17. The computer program product of claim 16.
Citation Information
Patent Citations
Application programming interface for data parallel computing in multiprocessor systems
JP2011523141A
System, method and program for run-time allocation of functions to hardware accelerator
JP2012133778A
Load balancing between general-purpose processors and graphics processors
JP2014505913A
Method and apparatus for vectorized resource scheduling in distributed computing systems using tensors
US20210089363A1
