Returns 1 if `o` is an instance of CompositeTensor. Returns 0 otherwise. Returns -1 if an error occurred.
| 494 | // Returns 0 otherwise. |
| 495 | // Returns -1 if an error occurred. |
| 496 | bool IsCompositeTensorHelper(PyObject* o) { |
| 497 | static auto* const check_cache = new CachedTypeCheck([](PyObject* to_check) { |
| 498 | return IsInstanceOfRegisteredType(to_check, "CompositeTensor"); |
| 499 | }); |
| 500 | return check_cache->CachedLookup(o); |
| 501 | } |
| 502 | |
| 503 | // Returns 1 if `o` is an instance of TypeSpec, but is not TensorSpec. |
| 504 | // Returns 0 otherwise. |
no test coverage detected