forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add targets to emit SPIR-V targeted to Mesa's OpenCL support, using SPIR-V 1.1. Substantially based on Dave Airlie's earlier work. libclc: spirv: remove step/smoothstep apis not defined for SPIR-V libclc: disable inlines for SPIR-V builds Reviewed By: jvesely, tstellar, jenatali Differential Revision: https://reviews.llvm.org/D77589
- Loading branch information
Showing
8 changed files
with
336 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
#define _CLC_OVERLOAD __attribute__((overloadable)) | ||
#define _CLC_DECL | ||
#define _CLC_DEF __attribute__((always_inline)) | ||
#define _CLC_INLINE __attribute__((always_inline)) inline | ||
|
||
/* avoid inlines for SPIR-V since we'll optimise later in the chain */ | ||
#if defined(CLC_SPIRV) || defined(CLC_SPIRV64) | ||
#define _CLC_DEF | ||
#else | ||
#define _CLC_DEF __attribute__((always_inline)) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
subnormal_config.cl | ||
../../generic/lib/async/async_work_group_strided_copy.cl | ||
../../generic/lib/async/wait_group_events.cl | ||
../../generic/lib/common/degrees.cl | ||
../../generic/lib/common/mix.cl | ||
../../generic/lib/common/radians.cl | ||
../../generic/lib/common/sign.cl | ||
../../generic/lib/common/smoothstep.cl | ||
../../generic/lib/common/step.cl | ||
../../generic/lib/geometric/cross.cl | ||
../../generic/lib/geometric/distance.cl | ||
../../generic/lib/geometric/dot.cl | ||
../../generic/lib/geometric/fast_distance.cl | ||
../../generic/lib/geometric/fast_length.cl | ||
../../generic/lib/geometric/fast_normalize.cl | ||
../../generic/lib/geometric/length.cl | ||
../../generic/lib/geometric/normalize.cl | ||
../../generic/lib/integer/rotate.cl | ||
../../generic/lib/integer/mad_sat.cl | ||
../../generic/lib/math/acos.cl | ||
../../generic/lib/math/acosh.cl | ||
../../generic/lib/math/acospi.cl | ||
../../generic/lib/math/asin.cl | ||
../../generic/lib/math/asinh.cl | ||
../../generic/lib/math/asinpi.cl | ||
../../generic/lib/math/atan.cl | ||
../../generic/lib/math/atan2.cl | ||
../../generic/lib/math/atan2pi.cl | ||
../../generic/lib/math/atanh.cl | ||
../../generic/lib/math/atanpi.cl | ||
../../generic/lib/math/cbrt.cl | ||
../../generic/lib/math/cos.cl | ||
../../generic/lib/math/cosh.cl | ||
../../generic/lib/math/cospi.cl | ||
../../generic/lib/math/ep_log.cl | ||
../../generic/lib/math/erf.cl | ||
../../generic/lib/math/erfc.cl | ||
../../generic/lib/math/exp.cl | ||
../../generic/lib/math/exp_helper.cl | ||
../../generic/lib/math/expm1.cl | ||
../../generic/lib/math/exp2.cl | ||
../../generic/lib/math/clc_exp10.cl | ||
../../generic/lib/math/exp10.cl | ||
../../generic/lib/math/fract.cl | ||
../../generic/lib/math/frexp.cl | ||
../../generic/lib/math/half_rsqrt.cl | ||
../../generic/lib/math/half_sqrt.cl | ||
../../generic/lib/math/clc_hypot.cl | ||
../../generic/lib/math/hypot.cl | ||
../../generic/lib/math/ilogb.cl | ||
../../generic/lib/math/lgamma.cl | ||
../../generic/lib/math/lgamma_r.cl | ||
../../generic/lib/math/log.cl | ||
../../generic/lib/math/log10.cl | ||
../../generic/lib/math/log1p.cl | ||
../../generic/lib/math/log2.cl | ||
../../generic/lib/math/logb.cl | ||
../../generic/lib/math/modf.cl | ||
../../generic/lib/math/tables.cl | ||
../../generic/lib/math/clc_pow.cl | ||
../../generic/lib/math/pow.cl | ||
../../generic/lib/math/clc_pown.cl | ||
../../generic/lib/math/pown.cl | ||
../../generic/lib/math/clc_powr.cl | ||
../../generic/lib/math/powr.cl | ||
../../generic/lib/math/clc_remainder.cl | ||
../../generic/lib/math/remainder.cl | ||
../../generic/lib/math/clc_remquo.cl | ||
../../generic/lib/math/remquo.cl | ||
../../generic/lib/math/clc_rootn.cl | ||
../../generic/lib/math/rootn.cl | ||
../../generic/lib/math/sin.cl | ||
../../generic/lib/math/sincos.cl | ||
../../generic/lib/math/sincos_helpers.cl | ||
../../generic/lib/math/sinh.cl | ||
../../generic/lib/math/sinpi.cl | ||
../../generic/lib/math/clc_tan.cl | ||
../../generic/lib/math/tan.cl | ||
../../generic/lib/math/tanh.cl | ||
../../generic/lib/math/clc_tanpi.cl | ||
../../generic/lib/math/tanpi.cl | ||
../../generic/lib/math/tgamma.cl | ||
../../generic/lib/shared/vload.cl | ||
../../generic/lib/shared/vstore.cl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2015 Advanced Micro Devices, Inc. | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in | ||
* all copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
* THE SOFTWARE. | ||
*/ | ||
|
||
#include <clc/clc.h> | ||
|
||
#include "config.h" | ||
|
||
_CLC_DEF bool __clc_fp16_subnormals_supported() { return false; } | ||
|
||
_CLC_DEF bool __clc_fp32_subnormals_supported() { return false; } | ||
|
||
_CLC_DEF bool __clc_fp64_subnormals_supported() { return false; } |
Oops, something went wrong.