mstxDomainCreateA

Function Description

Creates a custom mstx domain.

Domain: Organizes dotting data into domains for customized management. Any dotting data without a domain specified falls into the default domain. By default, all dotting data is in the default domain.

Function Prototype

1
mstxDomainHandle_t mstxDomainCreateA(const char* name)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

name

Input

Name of the domain to be created.

  • Data type: const char *
  • The default domain name is globalDomain.
  • The value contains a maximum of 1,023 bytes, including only digits, uppercase letters, lowercase letters, and underscores (_).
  • In MSPTI scenarios, the length cannot exceed 255 bytes.
  • In scenarios other than MSPTI (such as msProf command line and Ascend PyTorch Profiler), the length cannot exceed 1,024 bytes.

Returns

A valid domain handle indicates success. nullptr indicates execution failure.

Calling Example

mstxDomainHandle_t domain = mstxDomainCreateA("sample")