The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AI::MXNet::RunTime - Runtime querying of compile time features in the native library.

DESCRIPTION

With this module you can check at runtime which libraries and features were compiled in the library.

Example usage:

use AI::MXNet qw(mx);
my $features = mx->runtime->Features();

print $features->is_enabled("CUDNN");
0

print $features->is_enabled("CPU_SSE");
1

print Dumper($features->features);
$VAR1 = {
        'LAPACK' => 1,
        'F16C' => 1,
        'CPU_SSE2' => 1,
        'BLAS_MKL' => 0,
        'CXX14' => 0,
        'DIST_KVSTORE' => 0,
        'NCCL' => 0,
        'OPENMP' => 1,
        'CUDNN' => 0,
        'CPU_AVX' => 1,
        'CUDA_RTC' => 0,
        'BLAS_OPEN' => 1,
        'CPU_SSE4_2' => 1,
        'CPU_SSE4A' => 0,
        'TVM_OP' => 0,
        'MKLDNN' => 0,
        'TENSORRT' => 0,
        'JEMALLOC' => 1,
        'SSE' => 0,
        'PROFILER' => 0,
        'DEBUG' => 0,
        'BLAS_APPLE' => 0,
        'CPU_SSE3' => 1,
        'INT64_TENSOR_SIZE' => 0,
        'CPU_SSE4_1' => 1,
        'CUDA' => 0,
        'OPENCV' => 1,
        'CPU_SSE' => 1,
        'SIGNAL_HANDLER' => 0,
        'BLAS_ATLAS' => 0,
        'CAFFE' => 0,
        'CPU_AVX2' => 0
};

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]