Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Commit 3ed3ba3

Browse files
authored
Merge pull request #1496 from NVIDIA/bug/intel-compiler
Fix some minor issues impacting the Intel compiler.
2 parents 10c74b9 + a1be13b commit 3ed3ba3

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

ci/common/build.bash

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Thrust and CUB build script for gpuCI
1010
################################################################################
1111

12-
set -e
12+
set -e # Stop on errors.
1313

1414
# append variable value
1515
# Appends ${value} to ${variable}, adding a space before ${value} if
@@ -65,7 +65,9 @@ function join_delimit {
6565
################################################################################
6666

6767
# Get the variables the Docker container set up for us: ${CXX}, ${CUDACXX}, etc.
68+
set +e # Don't stop on errors from /etc/cccl.bashrc.
6869
source /etc/cccl.bashrc
70+
set -e # Stop on errors.
6971

7072
# Set path.
7173
export PATH=/usr/local/cuda/bin:${PATH}

testing/scan.cu

+11
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,17 @@ template <class Vector>
2626
void TestScanSimple(void)
2727
{
2828
typedef typename Vector::value_type T;
29+
30+
// icc miscompiles the intermediate sum updates for custom_numeric.
31+
// The issue doesn't happen with opts disabled, or on other compilers.
32+
// Printing the intermediate sum each iteration "fixes" the issue,
33+
// so likely a bad optimization.
34+
#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_INTEL
35+
if (std::is_same<T, custom_numeric>::value)
36+
{
37+
return;
38+
}
39+
#endif
2940

3041
typename Vector::iterator iter;
3142

thrust/detail/cstdint.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
#include <thrust/detail/config.h>
2020

21-
#if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) || (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG)
21+
#if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) || \
22+
(THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG) || \
23+
(THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_INTEL)
2224
#include <stdint.h>
2325
#endif
2426

0 commit comments

Comments
 (0)