Skip to content

Commit e2b1f1f

Browse files
committedNov 20, 2020
Merge branch 'develop' into opencl_gamma_lpdf
# Conflicts: # stan/math/opencl/opencl.hpp
2 parents eaab8ff + 7b9b75f commit e2b1f1f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3370
-220
lines changed
 

‎runTests.py

+12-5
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ def processCLIArgs():
7272
"-j", metavar="N", type=int, default=1, help="number of cores for make to use"
7373
)
7474

75+
parser.add_argument(
76+
"-e", metavar="M", type=int, default=-1, help="number of files to split expressions tests in"
77+
)
7578
tests_help_msg = "The path(s) to the test case(s) to run.\n"
7679
tests_help_msg += "Example: 'test/unit', 'test/prob', and/or\n"
7780
tests_help_msg += " 'test/unit/math/prim/fun/abs_test.cpp'"
@@ -269,10 +272,7 @@ def batched(tests):
269272
return [tests[i : i + batchSize] for i in range(0, len(tests), batchSize)]
270273

271274

272-
def handleExpressionTests(tests, only_functions, j):
273-
# for debugging we want single file, otherwise a large number to
274-
# better distribute the compiling workload
275-
n_test_files = 1 if j == 1 else 2 * j
275+
def handleExpressionTests(tests, only_functions, n_test_files):
276276
expression_tests = False
277277
for n, i in list(enumerate(tests))[::-1]:
278278
if "test/expressions" in i or "test\\expressions" in i:
@@ -327,7 +327,14 @@ def main():
327327
if inputs.do_jumbo:
328328
jumboFiles = generateJumboTests(tests)
329329

330-
handleExpressionTests(tests, inputs.only_functions, inputs.j)
330+
if inputs.e == -1:
331+
if inputs.j == 1:
332+
num_expr_test_files = 1
333+
else:
334+
num_expr_test_files = inputs.j * 4
335+
else:
336+
num_expr_test_files = inputs.e
337+
handleExpressionTests(tests, inputs.only_functions, num_expr_test_files)
331338

332339
tests = findTests(inputs.tests, inputs.f, inputs.do_jumbo)
333340

‎stan/math/opencl/kernel_generator.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
#include <stan/math/opencl/kernel_generator/constant.hpp>
117117
#include <stan/math/opencl/kernel_generator/append.hpp>
118118
#include <stan/math/opencl/kernel_generator/binary_operation.hpp>
119-
#include <stan/math/opencl/kernel_generator/unary_function_cl.hpp>
119+
#include <stan/math/opencl/kernel_generator/elt_function_cl.hpp>
120120
#include <stan/math/opencl/kernel_generator/unary_operation_cl.hpp>
121121
#include <stan/math/opencl/kernel_generator/block.hpp>
122122
#include <stan/math/opencl/kernel_generator/select.hpp>

0 commit comments

Comments
 (0)
Please sign in to comment.