aboutsummaryrefslogtreecommitdiff
path: root/libclc/spirv64
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-08-17 13:45:04 -0700
committerTom Stellard <tstellar@redhat.com>2020-08-17 14:01:46 -0700
commitc37145cab12168798a603e22af6b6bf6f606b705 (patch)
tree985a542470c6d886b8b723d0153910f5a2118ca9 /libclc/spirv64
parent1bf0732443ee464d40ff534a94bb42fed92c6efc (diff)
downloadllvm-c37145cab12168798a603e22af6b6bf6f606b705.zip
llvm-c37145cab12168798a603e22af6b6bf6f606b705.tar.gz
llvm-c37145cab12168798a603e22af6b6bf6f606b705.tar.bz2
libclc: Add Mesa/SPIR-V target
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
Diffstat (limited to 'libclc/spirv64')
-rw-r--r--libclc/spirv64/lib/SOURCES84
-rw-r--r--libclc/spirv64/lib/subnormal_config.cl31
2 files changed, 115 insertions, 0 deletions
diff --git a/libclc/spirv64/lib/SOURCES b/libclc/spirv64/lib/SOURCES
new file mode 100644
index 0000000..f594fa7
--- /dev/null
+++ b/libclc/spirv64/lib/SOURCES
@@ -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
diff --git a/libclc/spirv64/lib/subnormal_config.cl b/libclc/spirv64/lib/subnormal_config.cl
new file mode 100644
index 0000000..167fe1b
--- /dev/null
+++ b/libclc/spirv64/lib/subnormal_config.cl
@@ -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; }