Trap
Product Support
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
√ |
|
x |
|
x |
Function
Interrupts the running of the AI Core in NPU mode, and functions similarly to assert in CPU mode when called on the kernel. It can be used to debug abnormal scenarios on the kernel.
Prototype
1 | __aicore__ inline void Trap() |
Parameters
None
Returns
None
Restrictions
None
Example
1 | AscendC::Trap(); |
Parent topic: Exception Detection