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

[docs] Fix runtime feature detection documentation #16746

Merged
merged 3 commits into from
Dec 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/python_docs/python/api/mxnet/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ mxnet
mxnet.kvstore
mxnet.kvstore_server
mxnet.libinfo
mxnet.runtime
mxnet.lr_scheduler
mxnet.log
mxnet.metric
Expand Down Expand Up @@ -70,4 +71,4 @@ mxnet
:maxdepth: 2
:glob:

*/index
*/index
23 changes: 23 additions & 0 deletions docs/python_docs/python/api/mxnet/runtime/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.

mxnet.runtime
===============

.. automodule:: mxnet.runtime
:members:
:autosummary:
27 changes: 26 additions & 1 deletion python/mxnet/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,32 @@

# 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