When running the AI Engine
compiler with a target of
x86sim the compiler ignores the
--Xchess option. This means that the
flow does not support kernel-specific compile options.
To understand this better consider the following example. A common
method of making compile-time modifications to C code is using preprocessor
directives such as
#ifndef. To control these
preprocessor directives it is helpful to pass
#defines through the command line compiler options. The following
example code block takes two different actions based on a preprocessor
To define the SIM macro at compile time with the AI Engine compiler targeting hardware
hw) you can do the following.
aiecompiler -target=hw -Xchess="example_kernel:-DSIM"
-Xchess argument is ignored
when the compilation target is set to
is not defined for the x86 simulator case and the output of the kernel is Default
If you need to specify preprocessor options with the x86 simulator you can do
aiecompiler -target=x86sim --Xpreproc
-Xchess. It is important to note that
any options passed in this manner applies to all source code and all target
Can be used to pass kernel specific options to the CHESS compiler that is used to compile code for each AI Engine.The option string is specified as
This option string is included during compilation of generated
source files on the AI Engine
where the specified kernel function is mapped.
Pass general option to the PREPROCESSOR phase for
all source code compilations