Attach

Applicability

For details about the mapping between Ascend AI Processors and Ascend products, see Ascend Product Form Description.

Product

Supported

Atlas A3 training product/Atlas A3 inference product

x

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

Atlas training product

x

For Atlas A2 training product/Atlas A2 inference product, only Atlas 800I A2 inference products are supported.

For Atlas inference product, only the Atlas 300I Duo inference card and Atlas 800 inference server (model 3000) are supported.

Function

Adds Trace information to the current context.

Prototype

1
size_t Attach(const TraceId traceId, const SpanId spanId, const bool isSample = true)

Parameters

Table 1 Parameters

Parameter

Input/Output

Description

traceId

Input

Trace ID.

spanId

Input

Span ID.

isSample

Input

Sampling or not; defaults to true.

Returns

Returns the context index, which is used to call the API in Unattach.