Whether module runtime is enabled for target, e.g., The following code checks if cuda is enabled. Module.enabled("cuda") @param target The target device type. @return Whether runtime is enabled.
(String target)
| 127 | * @return Whether runtime is enabled. |
| 128 | */ |
| 129 | public static boolean enabled(String target) { |
| 130 | TVMValue ret = getApi("runtime.RuntimeEnabled").pushArg(target).invoke(); |
| 131 | return ret.asLong() != 0; |
| 132 | } |
| 133 | } |