marcoabreu closed pull request #12147: [MXNET-703] Remove unused TensorRT code
URL: https://github.com/apache/incubator-mxnet/pull/12147
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/python/mxnet/base.py b/python/mxnet/base.py
index 1bbc121ded9..3d8ee019175 100644
--- a/python/mxnet/base.py
+++ b/python/mxnet/base.py
@@ -729,19 +729,3 @@ def write_all_str(module_file, module_all_list):
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 eb599f69973..b37f8f3ff80 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))
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services