CUDA Graphics API Interoperability via Address Mapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems require inefficient data copying and buffer allocation when transitioning between graphics and compute APIs, hindering system performance by necessitating multiple buffer allocations and copies.

Innovation Solution

A method that registers a memory buffer for address mapping, allowing multiple APIs to access it, and uses semaphore mechanisms for synchronization, enabling direct access and exclusive usage without additional buffer allocation or data copying.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If data is copied from compute API memory to host memory and then to graphics API objects, then interoperability between APIs is achieved, but system performance deteriorates due to multiple buffer allocations and data copies

Engineering Contradiction:
ImproveAPI interoperabilityVSAvoidsystem performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent merges the memory spaces of multiple APIs by mapping graphics API objects into the CUDA address space, allowing both graphics and compute APIs to access the same memory buffer directly without copying data between separate buffers

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces address mapping as an intermediary mechanism that translates between different API address spaces, enabling direct access to shared memory buffers while maintaining compatibility with multiple API interfaces

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If multiple buffers are allocated for compute and graphics operations, then API interoperability is enabled, but device complexity increases

Engineering Contradiction:
ImproveAPI interoperabilityVSAvoidbuffer management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent makes memory buffers universal by enabling them to be accessed by multiple APIs simultaneously through address mapping, eliminating the need for separate buffers for different API operations

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent combines multiple API-specific buffers into a single shared memory space that can be accessed by both graphics and compute APIs, reducing the number of buffers from three to one

Inventive Principle:
Principle #5Merging (Combining)

3Adaptability or versatility

If data is copied between compute API and graphics API buffers, then interoperability is achieved, but execution speed decreases

Engineering Contradiction:
ImproveAPI interoperabilityVSAvoidexecution speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent enables continuous access to the same data by both graphics and compute APIs without interrupting the data flow through copying operations, maintaining uninterrupted execution pipelines

Inventive Principle:
Principle #20Continuity of useful action

Solution Approach 2:

The patent merges the data paths of compute and graphics operations into a single shared memory buffer, eliminating the sequential copy operations that previously slowed down execution

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS8402229B1System and method for enabling interoperability between application programming interfaces
Publication Date: 2013.03.19 NVIDIA CORP
  • US8402229B1 patent drawing
  • US8402229B1 patent drawing
  • US8402229B1 patent drawing

AI summary

One embodiment of the present invention sets forth a method for sharing graphics objects between a compute unified device architecture (CUDA) application programming interface (API) and a graphics API. The CUDA API includes calls used to alias graphics objects allocated by the graphics API and, subsequently, synchronize accesses to the graphics objects. When an application program emits a “register” call that targets a particular graphics object, the CUDA API ensures that the graphics object is in the device memory, and maps the graphics object into the CUDA address space. Subsequently, when the application program emits “map” and “unmap” calls, the CUDA API respectively enables and disables accesses to the graphics object through the CUDA API. Further, the CUDA API uses semaphores to synchronize accesses to the shared graphics object. Finally, when the application program emits an “unregister” call, the CUDA API configures the computing system to disregard interoperability constraints.