Whether this device exists. @return true if exists.
()
| 171 | * @return true if exists. |
| 172 | */ |
| 173 | public boolean exist() { |
| 174 | TVMValue ret = APIInternal.get("runtime.GetDeviceAttr") |
| 175 | .pushArg(deviceType) |
| 176 | .pushArg(deviceId) |
| 177 | .pushArg(0) |
| 178 | .invoke(); |
| 179 | return ((TVMValueLong) ret).value != 0; |
| 180 | } |
| 181 | |
| 182 | /** |
| 183 | * Maximum number of threads on each block. |