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

Commit

Permalink
Merge pull request #1496 from NVIDIA/bug/intel-compiler
Browse files Browse the repository at this point in the history
Fix some minor issues impacting the Intel compiler.
  • Loading branch information
alliepiper authored Jan 24, 2022
2 parents 10c74b9 + a1be13b commit 3ed3ba3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ci/common/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Thrust and CUB build script for gpuCI
################################################################################

set -e
set -e # Stop on errors.

# append variable value
# Appends ${value} to ${variable}, adding a space before ${value} if
Expand Down Expand Up @@ -65,7 +65,9 @@ function join_delimit {
################################################################################

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

# Set path.
export PATH=/usr/local/cuda/bin:${PATH}
Expand Down
11 changes: 11 additions & 0 deletions testing/scan.cu
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ template <class Vector>
void TestScanSimple(void)
{
typedef typename Vector::value_type T;

// icc miscompiles the intermediate sum updates for custom_numeric.
// The issue doesn't happen with opts disabled, or on other compilers.
// Printing the intermediate sum each iteration "fixes" the issue,
// so likely a bad optimization.
#if THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_INTEL
if (std::is_same<T, custom_numeric>::value)
{
return;
}
#endif

typename Vector::iterator iter;

Expand Down
4 changes: 3 additions & 1 deletion thrust/detail/cstdint.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

#include <thrust/detail/config.h>

#if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) || (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG)
#if (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) || \
(THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_CLANG) || \
(THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_INTEL)
#include <stdint.h>
#endif

Expand Down

0 comments on commit 3ed3ba3

Please sign in to comment.