Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ pipeline {
sh "echo STAN_OPENCL=true>> make/local"
sh "echo OPENCL_PLATFORM_ID=${env.OPENCL_PLATFORM_ID_CPU}>> make/local"
sh "echo OPENCL_DEVICE_ID=${env.OPENCL_DEVICE_ID_CPU}>> make/local"
// skips tests that require specific support in OpenCL
sh 'echo "ifdef NO_CPU_OPENCL_INT64_BASE_ATOMIC" >> make/local'
sh 'echo "CXXFLAGS += -DSTAN_TEST_SKIP_REQUIRING_OPENCL_INT64_BASE_ATOMIC" >> make/local'
sh "echo endif"

runTests("test/unit/math/opencl", false)
runTests("test/unit/multiple_translation_units_test.cpp")
} else {
Expand Down
10 changes: 7 additions & 3 deletions lib/tbb_2020.3/build/macos.inc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ ifndef arch
export arch:=ppc32
endif
else
ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
export arch:=intel64
ifeq ($(shell /usr/sbin/sysctl -n hw.machine),arm64)
export arch:=arm64
else
export arch:=ia32
ifeq ($(shell /usr/sbin/sysctl -n hw.optional.x86_64 2>/dev/null),1)
export arch:=intel64
else
export arch:=ia32
endif
endif
endif
endif
Expand Down
3 changes: 2 additions & 1 deletion test/unit/math/opencl/indexing_rev_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#ifdef STAN_OPENCL
#ifndef STAN_TEST_SKIP_REQUIRING_OPENCL_INT64_BASE_ATOMIC
#include <stan/math/opencl/indexing_rev.hpp>
#include <stan/math/opencl/copy.hpp>
#include <test/unit/util.hpp>
Expand Down Expand Up @@ -46,5 +47,5 @@ TEST(indexing_rev, indexing_rev_large) {
EXPECT_NEAR_REL(stan::math::from_matrix_cl(adj_cl), correct);
}
}

#endif // STAN_TEST_SKIP_REQUIRING_OPENCL_INT64_BASE_ATOMIC
#endif
6 changes: 4 additions & 2 deletions test/unit/math/rev/core/profiling_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ TEST(Profiling, double_basic) {
double a = 3.0, b = 2.0, c;
{
profile<double> p1("p1", profiles);
c = a + b;
c = log(exp(a)) * log(exp(b));
}
{
profile<int> p1("p1", profiles);
c = a + b;
c = log(exp(a)) * log(exp(b));
}

stan::math::profile_key key = {"p1", std::this_thread::get_id()};
EXPECT_NEAR(c, 6.0, 1E-8);
EXPECT_EQ(profiles[key].get_chain_stack_used(), 0);
EXPECT_EQ(profiles[key].get_nochain_stack_used(), 0);
EXPECT_FLOAT_EQ(profiles[key].get_rev_time(), 0.0);
Expand Down