PawelGlomski-Intel commented on code in PR #20983:
URL: https://github.com/apache/incubator-mxnet/pull/20983#discussion_r846203223


##########
python/mxnet/amp/__init__.py:
##########
@@ -20,3 +20,33 @@
 """Automatic mixed precision module."""
 
 from .amp import *
+
+import ctypes
+from ..base import (_LIB, check_call)
+
+
+def set_is_amp_disabled(value):
+    prev = ctypes.c_int()
+    check_call(_LIB.MXSetIsAMPDisabled(ctypes.c_int(value), 
ctypes.byref(prev)))
+    return bool(prev.value)
+
+
+def is_amp_disabled():
+    curr = ctypes.c_int()
+    check_call(_LIB.MXIsAMPDisabled(ctypes.byref(curr)))
+    return bool(curr.value)
+
+
+def disable_amp():
+    return _DisableAMPScope()
+
+
+class _DisableAMPScope(object):
+    def __init__(self):  # pylint: disable=redefined-outer-name

Review Comment:
   I don't think so



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to