GTPin: GTPin: Host-to-Device Memory Mapper

GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

Data Structures | Enumerations | Functions
GTPin: Host-to-Device Memory Mapper
GTPin: High-Level Instrumentation Interface (HLIF)

GTPin service that shares objects between host and device address spaces More...

## Data Structures
class | gtpin::GtMmapMethod
| Method of the host-to-device memory mapping and sharing. More...
class | gtpin::IGtMemoryMapper
| Class that provides the host-to-device memory mapping service. This feature enables transparent data sharing between host and device address spaces. More...
class | gtpin::GtMapped< MM, VARS >
| Template container of host-to-device mapped variables. More...
## Enumerations
enum | gtpin::GT_MMAP_METHOD { , gtpin::GT_MMAP_SHARE, gtpin::GT_MMAP_SHARE_CONST, gtpin::GT_MMAP_SHARE_RET, gtpin::GT_MMAP_NO_SHARE }
| Method of the host-to-device memory mapping and sharing. More...
## Functions
template<GT_MMAP_METHOD MM, typename... VARS>
GtMapped< MM, VARS...> | gtpin::GtMakeMapped (const VARS &...vars)
| Create a GtMapped object, deducing the template types from the types of arguments.
template<typename... VARS>
GtMapped< GT_MMAP_SHARE, VARS...> | gtpin::GtMakeShared (const VARS &...vars)
| Alias of the GtMakeMapped<GT_MMAP_SHARE> function.
template<typename... VARS>
GtMapped< GT_MMAP_SHARE_CONST, VARS...> | gtpin::GtMakeSharedConst (const VARS &...vars)
| Alias of the GtMakeMapped<GT_MMAP_SHARE_CONST> function.
template<typename... VARS>
GtMapped< GT_MMAP_SHARE_RET, VARS...> | gtpin::GtMakeSharedRet (const VARS &...vars)
| Alias of the GtMakeMapped<GT_MMAP_SHARE_RET> function.

## Detailed Description

GTPin service that shares objects between host and device address spaces

The host-to-device memory mapping is a GTPin service that provides interface for transparent sharing of objects and memory regions between host and device address spaces. Depending on the sharing method, GTPin synchronizes content of mapped memory regions before kernel run, and/or after the kernel completion.

This mechanism is especially useful in mapping arguments of HLI functions. These functions are executed by a GPU device, so all pointer parameters of the function should refer to objects in the profile buffer. However, for tools that define instrumentation functions in the host (CPU) space, addresses in the device space are unknown.
The host-to-device memory mapping interface IGtMemoryMapper and helper class GtMapped allow tools to specify host pointers in function arguments, and instruct GTPin to copy the referenced objects to/from the profile buffer in the device address space.

## Enumeration Type Documentation

enum gtpin::GT_MMAP_METHOD

Method of the host-to-device memory mapping and sharing.

The host-to-device memory mapping is a GTPin service that allows tools to specify host pointers in HLI function arguments, and instruct GTPin to share the referenced data between host and device address spaces.
Depending on the sharing method, GTPin synchronizes content of mapped memory regions before kernel run, and/or after the kernel completion.

GTPin supports the following methods of memory mapping and sharing:
GT_MMAP_SHARE - The content of the mapped region is synchronized at the start and completion of the kernel. Can be used for sharing in&out objects passed by reference
GT_MMAP_SHARE_CONST - The content of the mapped region is synchronized only at the start of the kernel. Can be used for sharing input objects passed by the reference
GT_MMAP_SHARE_RET - The content of the mapped region is synchronized only at the completion of the kernel. Can be used for sharing output objects passed by the reference
GT_MMAP_NO_SHARE - Content of the mapped region is not shared at all; only address range in the host space is mapped to the corresponding range in the device address space. The IGtMemoryMapper class provides access to such regions using addresses in the host space

Enumerator:

  GT_MMAP_SHARE | Map host-to-device address range; share data at the start and completion of the kernel.
  GT_MMAP_SHARE_CONST | Map host-to-device address range; share data at the start of the kernel.
  GT_MMAP_SHARE_RET | Map host-to-device address range; share data at the completion of the kernel.
  GT_MMAP_NO_SHARE | Map host-to-device address range; no data sharing.

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT