MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / disable_xla_impl

Function disable_xla_impl

tensorflow/python/framework/test_util.py:1654–1670  ·  view source on GitHub ↗

Execute the test method only if xla is not enabled.

(func)

Source from the content-addressed store, hash-verified

1652def disable_xla(description):
1653
1654 def disable_xla_impl(func):
1655 """Execute the test method only if xla is not enabled."""
1656
1657 def decorator(func):
1658
1659 def decorated(self, *args, **kwargs):
1660 if is_xla_enabled():
1661 return
1662 else:
1663 return func(self, *args, **kwargs)
1664
1665 return decorated
1666
1667 if func is not None:
1668 return decorator(func)
1669
1670 return decorator
1671
1672 return disable_xla_impl
1673

Callers

nothing calls this directly

Calls 1

decoratorFunction · 0.70

Tested by

no test coverage detected