tft_register_stream_sync_handler

Function

Registers a synchronous callback.

For MindSpeed-LLM, the callback function has been adapted by MindIO TFT. For other frameworks, you need to ensure the security of the callback function.

Format

mindio_ttp.framework_ttp.tft_register_stream_sync_handler(func: Callable, ctx=None)

Parameters

Parameter

Mandatory/Optional

Description

Value

func

Mandatory

Synchronization callback function to synchronize the operation after training is paused, ensuring no residual operators remain in the operator queue.

This callback function cannot be empty. The callback function has no parameter or return value. If the callback function fails to be executed, an exception is thrown.

ctx

-

Callback function context

Determined by the registration party.

Return Value

No return value. If an error occurs, an error log is recorded and an exception is thrown.