Naming Information#

int roctxNameOsThread(const char *name)#

Indicate to a profiling tool that, where possible, you would like the current CPU OS thread to be labeled by the provided name in the output of the profiling tool.

Rocprofiler does not provide explicit support for how profiling tools handle this request: support for this capability is tool specific. ROCTx does NOT rename the thread via pthread_setname_np.

Parameters:

name[in] Name for the current OS thread

Returns:

int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support

int roctxNameHsaAgent(const char *name, const struct hsa_agent_s *agent)#

Indicate to a profiling tool that, where possible, you would like the given HSA agent to be labeled by the provided name in the output of the profiling tool.

Rocprofiler does not provide any explicit support for how profiling tools handle this request: support for this capability is tool specific.

Parameters:
  • name[in] Name for the specified agent

  • agent[in] Pointer to a HSA agent identifier

Returns:

int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support

int roctxNameHipDevice(const char *name, int device_id)#

Indicate to a profiling tool that, where possible, you would like the given HIP device id to be labeled by the provided name in the output of the profiling tool.

Rocprofiler does not provide any explicit support for how profiling tools handle this request: support for this capability is tool specific.

Parameters:
  • name[in] Name for the specified device

  • device_id[in] HIP device ordinal

Returns:

int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support

int roctxNameHipStream(const char *name, const struct ihipStream_t *stream)#

Indicate to a profiling tool that, where possible, you would like the given HIP stream to be labeled by the provided name in the output of the profiling tool.

Rocprofiler does not provide any explicit support for how profiling tools handle this request: support for this capability is tool specific.

Parameters:
  • name[in] Name for the specified stream

  • stream[in] A hipStream_t value (hipStream_t == ihipStream_t*)

Returns:

int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support

int roctxGetThreadId(roctx_thread_id_t *tid)#

Retrieve a id value for the current thread which will be identical to the id value a profiling tool gets via rocprofiler_get_thread_id(rocprofiler_thread_id_t*)

Parameters:

tid – [out] Pointer to where the value should be placed

Returns:

int A profiling tool may choose to set this value to a non-zero value to indicate a failure while executing the request or lack of support