szha commented on a change in pull request #20338:
URL: https://github.com/apache/incubator-mxnet/pull/20338#discussion_r657102332



##########
File path: python/mxnet/util.py
##########
@@ -848,3 +848,20 @@ def setenv(name, value):
     """
     passed_value = None if value is None else c_str(value)
     check_call(_LIB.MXSetEnv(c_str(name), passed_value))
+
+def set_flush_denorms(value):
+    """Change floating-point calculations when dealing with denormalized 
values.
+       This is only applicable to architectures which supports flush-to-zero.
+       Denormalized values are positive and negative values that are very 
close to 0
+       (exponent is the smallest possible value).
+       Flushing denormalized values to 0 can speedup calculations if such 
values occurs,
+       but if fulfilling whole IEEE 754 standard is required this option 
should be disabled.
+    Parameters
+    ----------
+    value : bool
+        State of flush-to-zero and denormals-are-zero in MXCSR register

Review comment:
       ```suggestion
   def set_flush_denorms(value):
       """Change floating-point calculations on CPU when dealing with 
denormalized values.
          This is only applicable to architectures which supports flush-to-zero.
          Denormalized values are positive and negative values that are very 
close to 0
          (exponent is the smallest possible value).
          Flushing denormalized values to 0 can speedup calculations if such 
values occurs,
          but if fulfilling whole IEEE 754 standard is required this option 
should be disabled.
   
       Parameters
       ----------
       value : bool
           State of flush-to-zero and denormals-are-zero in MXCSR register
   ```




-- 
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.

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


Reply via email to