Attach

Applicability

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

Product

Supported (Yes/No)

Atlas A3 training products/Atlas A3 inference products

x

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

x

Atlas inference products

Atlas training products

x

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

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

Function Description

Adds Trace information to the current context.

Prototype

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

Parameter Description

Table 1 Parameter description

Parameter

Input/Output

Description

traceId

Input

Trace ID.

spanId

Input

Span ID.

isSample

Input

Sampling or not; defaults to true.

Return Value Description

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