dependencies - jimmytwei/oneAPI-samples GitHub Wiki
This attribute is recognized by all sample browsers.
The "dependencies"
array specifies which tools or "components" are needed to
build and run a sample. The names of the dependent components must match
exactly their installed directory names (e.g. "mkl", "tbb", "vtune", etc.).
A test is performed by the sample browsers to determine if the required dependencies have been installed and are available on a user's development system. If one or more dependencies are found to be missing, an appropriate warning is presented to the user when they are viewing and/or creating a sample project based on the sample.
NOTE: Lack of a dependency does not prevent a project from being created, it simply serves as a way to let the user know that the new sample project may fail to build or run correctly unless they resolve the missing dependencies.
As of the 2021.2 oneAPI release, the complete set of oneAPI product toolkits included the following component folders (based on a full Linux install):
ospray_studio | tensorflow | advisor | pytorch | oidn |
intel-eclipse-ide | debugger | ccl | clck | ipp |
system_debugger | intelpython | itac | mkl | dnnl |
conda_channel | rkcommon | openvkl | tbb | ippcp |
dev-utilities | inspector | ospray | dal | vpl |
eclipse-iot-plugins | compiler | vtune | mpi | iLiT |
rkutil | dpcpp-ct | embree | modelzoo | dpl |
If a component folder name changes (either in case or spelling) it must be
updated inside any sample.json
files that references it. The sample browsers
do not attempt to perform an approximate match. Thus, an incorrectly spelled
dependency in a "dependencies"
list will always appear as a missing
dependency for the sample associated with that sample.json
file.
On Linux, external dependencies can be managed using package config
(pkg-config
). Normally, an entry in the "dependencies"
array is simply
mapped to a oneAPI component directory. However, if it is preceded with pkg|
then it means the sample browser will check for the named package.
The full syntax is:
pkg|<package-name>|<url>
where the <url>
will be passed to the user in the event the package
is not found. The <url>
is optional (though highly recommended).
Example:
"dependencies":["pkg|mraa|https://github.com/intel-iot-devkit/mraa","mkl"]
The compiler|
dependency can be used to name a specific Intel compiler
dependency from the following list:
- dpcpp
- dpcpp-cl (Windows only, use dpcpp instead)
- icx
- icpx
- icc
- icpc
- ifx
- ifort
For example, if a sample specifically depends on icpc for compilation, the
sample.json
file can specify that this Intel compiler is required by way of
the compiler|icpc
dependency declaration, as part of the "dependencies"
array.
Normally, an entry in the "dependencies"
array is mapped directly to a
oneAPI component folder name. But the compiler
component must be handled
differently because multiple "sub-components" (compilers) are embedded
inside the compiler
component's folder.
NOTE: The dpcpp-cl compiler is unique to Windows. For the purposes of specifying a dependency on the
dpcpp-cl
compiler, usedpcpp
. This will minimize alert notifications across multiple OSes. This attribute does not specify which compiler is used to compile your sample! Your build files (VS proj, CMakeLists.txt or Makefile) control which compiler is used. This feature is only used to alert user's if the compiler is present.
The full syntax is:
`compiler|<compiler-name>`
Example:
"dependencies":["compiler|icc","mkl"]
NOTE: See also the "toolchain" section of this document.