api_check_support
Function
Checks whether an API is supported by the Ascend AI Processor. With the optional parameter dtype configured, this API checks whether the API of the dtype type is supported by the Ascend AI Processor.
Prototype
def api_check_support(intrinsic, dtype="")
Parameters
Parameter |
Type |
Description |
---|---|---|
intrinsic |
String (required) |
Specifies the input API.
|
dtype |
String (optional) |
Specifies the data types supported by the API to be verified. If this parameter is left blank, data type verification is not performed.
|
Returns
Parameter |
Type |
Description |
---|---|---|
whether_support |
bool |
True if supported; else, False |
Restrictions
None
Examples
- Example of checking supported DSL APIs
te.platform.api_check_support("te.lang.cce.vmax", dtype="float16")
For details about the APIs and data types, see TBE DSL APIs.
- Example of checking supported TIK APIs
te.platform.api_check_support("tik.vec_add", dtype="float16")
For details about the APIs and data types, see TIK APIs.