Commit 6d30e1ff authored by Carl Case's avatar Carl Case
Browse files

rename build->init

parent ec431d33
from .amp import build, half_function, float_function, promote_function,\ from .amp import init, half_function, float_function, promote_function,\
register_half_function, register_float_function, register_promote_function register_half_function, register_float_function, register_promote_function
...@@ -51,10 +51,10 @@ def register_promote_function(module, name): ...@@ -51,10 +51,10 @@ def register_promote_function(module, name):
if not hasattr(module, name): if not hasattr(module, name):
raise ValueError('No function named {} in module {}.'.format( raise ValueError('No function named {} in module {}.'.format(
name, module)) name, module))
_USER_PROMOTE_REGISTRY.add((mod, fn.__name__)) _USER_PROMOTE_REGISTRY.add((module, name))
# Top-level function to insert _all_ the hooks. # Top-level function to insert _all_ the hooks.
def build(enabled=True, enable_caching=True, verbose=False): def init(enabled=True, enable_caching=True, verbose=False):
global _DECORATOR_HANDLE global _DECORATOR_HANDLE
if not enabled: if not enabled:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment