audioPluginConfig
Description
The audioPluginConfig
object enables you to validate and generate audio
plugins that use deep learning pretrained networks. This object also allows you to pass code
replacement libraries to the generateAudioPlugin
function.
Creation
Description
creates an object that describes the coder configuration for your audio plugin. Use
name-value arguments to specify the properties of the object.obj
= audioPluginConfig(Name,Value
)
This object generates a constant property called PluginConfig
for
audio plugin classes. Use the audioPluginConfig
object if your plugin uses deep
learning networks or a code replacement library.
Properties
Deep learning library configuration, specified as an empty array
([]
), coder.DeepLearningConfig("none")
, or
coder.DeepLearningConfig("mkldnn")
.
You can also use the generateAudioPlugin
user interface (UI) to
specify the deep learning library for plugin generation.
Value | generateAudioPlugin UI Setting | Description |
---|---|---|
[] | Set Deep learning library to
None | Do not use a deep learning library. |
coder.DeepLearningConfig("none") | Set Deep learning library to Plain
C | Generate code that does not use any third-party library. |
coder.DeepLearningConfig("mkldnn") | Set Deep learning library to Intel
MKL-DNN | Generate code that uses the Intel® Math Kernel Library for Deep Neural Networks (Intel MKL-DNN). This option does not work on Macintosh platforms using ARM® processors. This option is not supported with the
For more information about installing the MKL-DNN library and setting the related environment variables, see Prerequisites for Deep Learning with MATLAB Coder (MATLAB Coder). This option is not supported in MATLAB® Online™. |
You must have MATLAB Coder™ Interface for Deep Learning installed to use this property unless you choose the []
option. For more information, see coder.DeepLearningConfig
(MATLAB Coder).
Code replacement library configuration, specified as an empty string
(""
), "none"
, "Intel AVX
(Windows)"
, "DSP Intel AVX2-FMA (Windows)"
, "DSP
Intel AVX2-FMA (Linux)"
, or "DSP Intel AVX2-FMA
(Mac)"
.
You can also use the generateAudioPlugin
user interface (UI) to
specify the code replacement library for plugin generation.
Value | generateAudioPlugin UI Setting | Description |
---|---|---|
"" or "none" | Set Code replacement library to
None | Do not use a code replacement library. |
"Intel AVX (Windows)" | Set Code replacement library to Intel AVX
(Windows) | Generate code that uses the Intel AVX code replacement library. This option works only on
Windows platforms. This option is not supported with the
-win32 option of the
generateAudioPlugin function. |
"DSP Intel AVX2-FMA (Windows)" | Set Code replacement library to DSP Intel
AVX2-FMA (Windows) | Generate code that uses the Intel DSP AVX2-FMA code replacement library. This option works only on
Windows platforms. This option is not supported with the
-win32 option of the
generateAudioPlugin function. |
"DSP Intel AVX2-FMA (Linux)" | Set Code replacement library to DSP Intel
AVX2-FMA (Linux) | Generate a JUCE project that uses the Intel DSP AVX2-FMA code replacement library for Linux platforms. This option works only with the
-juceproject option of the
generateAudioPlugin function. |
"DSP Intel AVX2-FMA (Mac)" | Set Code replacement library to DSP Intel
AVX2-FMA (Mac) | Generate code that uses the Intel DSP AVX2-FMA code replacement library. This option works only on Intel Mac platforms. |
You must have Embedded Coder® installed to use this property. For more information about code replacement libraries, see What Is Code Replacement Customization? (Embedded Coder). For more information on using the DSP AVX2-FMA code replacement libraries with System objects, see System objects in DSP System Toolbox that Support SIMD Code Generation.
Use this argument to specify whether to create a separate file for network weights
when generating audio plugins with deep learning models. Set
LargeConstantGeneration
to
"WriteDNNConstantsToDataFiles"
to generate a separate
.bin
file with the weights when generating the plugin.
Data Types: char
| string
Examples
Create the source file for a plugin class,
MyAudioPlugin
, that uses the Intel AVX code replacement library for Windows. Add a processing function to the class.
classdef MyAudioPlugin < audioPlugin properties (Constant) PluginConfig = audioPluginConfig( ... 'DeepLearningConfig',coder.DeepLearningConfig('none'), ... 'CodeReplacementLibrary','Intel AVX (Windows)'); end methods function out = process(~,in) out = in; end end end
To validate the plugin, use the validateAudioPlugin
function. To generate the plugin, use the generateAudioPlugin
function.
Create a DeepLearningConfigBase
configuration object
that generates code that does not use any third-party library. Use the
audioPluginConfig
object to specify a plugin that incorporates the previous
property and uses the Intel AVX code replacement library for Windows. Generate the audio plugin.
dlcfg = coder.DeepLearningConfig('none'); cfg = audioPluginConfig( ... 'DeepLearningConfig',dlcfg, ... 'CodeReplacementLibrary','Intel AVX (Windows)'); generateAudioPlugin -audioconfig cfg MyAudioPlugin
Version History
Introduced in R2021b
See Also
Functions
Objects
audioPlugin
|audioPluginInterface
|audioPluginParameter
|audioPluginSource
|coder.DeepLearningConfig
(MATLAB Coder)
Apps
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)