triSYCL currently has one optional environment variable to turn on a work in progress feature. triSYCL also makes use of some libraries that have their own environment variables that can effect the build process.
Of course the generic environment variables of the operating system have impacts on the execution, for example by selecting the right dynamic libraries and so on.
TRISYCL_USE_OPENCL_ND_RANGE
When set to "1"
the triSYCL Makefile will add the definition
"TRISYCL_USE_OPENCL_ND_RANGE
to the appropriate compile steps to allow
the execution of parallel_for
kernels using OpenCL's ND-range. This should
be used in conjunction with the other triSYCL OpenCL environment
variables.
Otherwise the kernels are executed as a single task with 1 work-group and 1 work-item only and all the ND-range is actually executed with a loop nest inside the kernel. This is a typical use case for FPGA.
In this library https://www.boost.org/doc/libs/release/libs/compute used to support OpenCL, there are some environment variables described in https://github.com/boostorg/compute/blob/master/include/boost/compute/system.hppto that influence the default device used by the implementation:
BOOST_COMPUTE_DEFAULT_DEVICE
"GTX TITAN"
)BOOST_COMPUTE_DEFAULT_DEVICE_TYPE
"GPU"
or "CPU"
)BOOST_COMPUTE_DEFAULT_PLATFORM
"NVIDIA CUDA"
)BOOST_COMPUTE_DEFAULT_VENDOR
"Xilinx"
)BOOST_COMPUTE_DEFAULT_ENFORCE
"1"
, then throw a no_device_found()
exception
if any of the above environment variables is set, but a matching
device was not found.There are also some macros such as BOOST_COMPUTE_USE_OFFLINE_CACHE
than can be used to cache the kernels instead of recompiling them
every time.
triSYCL can use OpenMP to speed up execution of the kernels on CPU.
Look at the documentation of the implementation you are using to see the list of environment variables.
For example with GCC libgomp
look at
https://gcc.gnu.org/onlinedocs/libgomp/Environment-Variables.html
describing for example among others:
OMP_NUM_THREADS
Refer to the OpenCL implementation you are using for the useful environment variables.
triSYCL can be used in conjunction with Xilinx's Software and Hardware Emulation
when compiling using SDx and xocc
for FPGA's to simulate the results of running
the kernels on Xilinx hardware. Two environment variables are used to support
this:
XCL_EMULATION_MODE
sw_emu
or hw_emu
. If
undefined it will default to hw
and look for a real device.TARGET_DEVICE
xilinx_vcu1525_dynamic_5_1
.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。