forked from OSchip/llvm-project
![]() This makes it possible for runtime implementations to disable subnormal handling at runtime. When this flag is enabled, decisions about how to handle subnormals in the library will be controlled by an external variable called __CLC_SUBNORMAL_DISABLE. Function implementations should use these new helpers for querying subnormal support: __clc_fp16_subnormals_supported(); __clc_fp32_subnormals_supported(); __clc_fp64_subnormals_supported(); In order for the library to link correctly with this feature, users will be required to either: 1. Insert this variable into the module (if using the LLVM/Clang C++/C APIs). 2. Pass either subnormal_disable.bc or subnormal_use_default.bc to the linker. These files are distributed with liblclc and installed to $(installdir). e.g.: llvm-link -o kernel-out.bc kernel.bc builtins-nosubnormal.bc subnormal_disable.bc or llvm-link -o kernel-out.bc kernel.bc builtins-nosubnormal.bc subnormal_use_default.bc If you do not supply the --enable-runtime-subnormal then the library behaves the same as it did before this commit. In addition to these changes, the patch adds helper functions that should be used when implementing library functions that need special handling for denormals: __clc_fp16_subnormals_supported(); __clc_fp32_subnormals_supported(); __clc_fp64_subnormals_supported(); llvm-svn: 235329 |
||
---|---|---|
.. | ||
async | ||
atomic | ||
cl_khr_global_int32_base_atomics | ||
cl_khr_global_int32_extended_atomics | ||
cl_khr_local_int32_base_atomics | ||
cl_khr_local_int32_extended_atomics | ||
common | ||
geometric | ||
integer | ||
math | ||
relational | ||
shared | ||
workitem | ||
SOURCES | ||
clcmacro.h | ||
gen_convert.py | ||
subnormal_config.cl | ||
subnormal_disable.ll | ||
subnormal_helper_func.ll | ||
subnormal_use_default.ll |