Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Add example for documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
larroy committed Nov 7, 2019
1 parent 6152e41 commit 5c1e964
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion python/mxnet/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,28 @@

# pylint: disable=not-an-iterable

"""runtime querying of compile time features in the native library"""
"""Runtime querying of compile time features in the native library.
With this module you can check at runtime which libraries and features were compiled in the library.
Example usage:
.. code-block:: python
import mxnet
features=mxnet.runtime.Features()
features.is_enabled("CUDNN")
False
features.is_enabled("CPU_SSE")
True
print(features)
[✖ CUDA, ✖ CUDNN, ✖ NCCL, ✖ CUDA_RTC, ✖ TENSORRT, ✔ CPU_SSE, ✔ CPU_SSE2, ✔ CPU_SSE3, ✔ CPU_SSE4_1, ✔ CPU_SSE4_2, ✖ CPU_SSE4A, ✔ CPU_AVX, ✖ CPU_AVX2, ✔ OPENMP, ✖ SSE, ✔ F16C, ✔ JEMALLOC, ✔ BLAS_OPEN, ✖ BLAS_ATLAS, ✖ BLAS_MKL, ✖ BLAS_APPLE, ✔ LAPACK, ✖ MKLDNN, ✔ OPENCV, ✖ CAFFE, ✖ PROFILER, ✖ DIST_KVSTORE, ✖ CXX14, ✖ INT64_TENSOR_SIZE, ✔ SIGNAL_HANDLER, ✔ DEBUG, ✖ TVM_OP]
"""

import ctypes
import collections
Expand Down

0 comments on commit 5c1e964

Please sign in to comment.