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

Commit

Permalink
Address CR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Pedro Larroy committed Feb 26, 2019
1 parent 3165714 commit bba8ad6
Showing 1 changed file with 59 additions and 14 deletions.
73 changes: 59 additions & 14 deletions docs/api/python/libinfo/libinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,68 @@ The libinfo functionality allows to check for compile-time features supported by
### Example usage

```
In [1]: import mxnet as mx
In []: import mxnet as mx
...: import mxnet.runtime
...: fs = mx.runtime.Features()
In [2]: fs
Out[2]: [✖ 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, ✔ SIGNAL_HANDLER, ✔ DEBUG]
In [3]: fs['CUDA'].enabled
Out[3]: False
In [4]: fs.is_enabled('CPU_SSE')
Out[4]: True
In [5]: fs.is_enabled('CUDA')
Out[5]: False
In [6]:
In []: fs
Out[]: [✖ 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, ✔ SIGNAL_HANDLER, ✔ DEBUG]
In []: fs.keys()
Out[]: odict_keys(['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', 'SIGNAL_HANDLER', 'DEBUG'])
In []: type(fs['CUDA'])
Out[]: mxnet.runtime.Feature
In []: fs['CUDA'].enabled
Out[]: False
In []: fs.is_enabled('CPU_SSE')
Out[]: True
In []: fs.is_enabled('CUDA')
Out[]: False
In []: features = mx.runtime.feature_list()
In []: features
Out[]:
[✖ 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,
✔ SIGNAL_HANDLER,
✔ DEBUG]
In []: type(features)
Out[]: list
In []: type(features[0])
Out[]: mxnet.runtime.Feature
```


Expand Down

0 comments on commit bba8ad6

Please sign in to comment.