This is an automated email from the ASF dual-hosted git repository.

marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new ee8755a  Remove unused TensorRT code (#12147)
ee8755a is described below

commit ee8755a2531b322fec29c9c3d2aa3b8738da41f3
Author: Kellen Sunderland <[email protected]>
AuthorDate: Mon Aug 13 13:15:21 2018 +0200

    Remove unused TensorRT code (#12147)
    
    Removing some python code that isn't in the current TensorRT execution 
paths.
    This should make the code more readable and avoid potential linting errors.
    
    Thanks to @vandanavk for pointing out the dead code and @cclauss for a quick
    alternative fix.
    
    Co-authored-by: Vandana Kannan <[email protected]>
    Co-authored-by: cclauss <[email protected]>
---
 python/mxnet/base.py            | 16 ----------------
 tests/python/tensorrt/common.py |  9 ---------
 2 files changed, 25 deletions(-)

diff --git a/python/mxnet/base.py b/python/mxnet/base.py
index 1bbc121..3d8ee01 100644
--- a/python/mxnet/base.py
+++ b/python/mxnet/base.py
@@ -729,19 +729,3 @@ def _generate_op_module_signature(root_namespace, 
module_name, op_code_gen_func)
     module_op_file.close()
     write_all_str(module_internal_file, module_internal_all)
     module_internal_file.close()
-
-def cint(init_val=0):
-    """create a C int with an optional initial value"""
-    return C.c_int(init_val)
-
-def int_addr(x):
-    """given a c_int, return it's address as an int ptr"""
-    x_addr = C.addressof(x)
-    int_p = C.POINTER(C.c_int)
-    x_int_addr = C.cast(x_addr, int_p)
-    return x_int_addr
-
-def checked_call(f, *args):
-    """call a cuda function and check for success"""
-    error_t = f(*args)
-    assert error_t == 0, "Failing cuda call %s returns %s." % (f.__name__, 
error_t)
diff --git a/tests/python/tensorrt/common.py b/tests/python/tensorrt/common.py
index eb599f6..b37f8f3 100644
--- a/tests/python/tensorrt/common.py
+++ b/tests/python/tensorrt/common.py
@@ -15,7 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-import os
 from ctypes.util import find_library
 
 
@@ -29,11 +28,3 @@ def merge_dicts(*dict_args):
     for dictionary in dict_args:
         result.update(dictionary)
     return result
-
-
-def get_fp16_infer_for_fp16_graph():
-    return int(os.environ.get("MXNET_TENSORRT_USE_FP16_FOR_FP32", 0))
-
-
-def set_fp16_infer_for_fp16_graph(status=False):
-    os.environ["MXNET_TENSORRT_USE_FP16_FOR_FP32"] = str(int(status))

Reply via email to