Skip to content

Commit 7893e20

Browse files
Merge branch 'main' into pull-logger-out-from-communicator
2 parents db7a960 + f89425a commit 7893e20

5 files changed

Lines changed: 48 additions & 31 deletions

File tree

.github/workflows/build.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
packages: read
4444
pull-requests: read
4545
secrets: inherit # zizmor: ignore[secrets-inherit]
46-
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@cuda-13.3.0
46+
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main
4747
with:
4848
build_type: ${{ inputs.build_type || 'branch' }}
4949
branch: ${{ inputs.branch }}
@@ -60,7 +60,7 @@ jobs:
6060
packages: read
6161
pull-requests: read
6262
secrets: inherit # zizmor: ignore[secrets-inherit]
63-
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@cuda-13.3.0
63+
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main
6464
with:
6565
build_type: ${{ inputs.build_type || 'branch' }}
6666
branch: ${{ inputs.branch }}
@@ -78,7 +78,7 @@ jobs:
7878
packages: read
7979
pull-requests: read
8080
secrets: inherit # zizmor: ignore[secrets-inherit]
81-
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@cuda-13.3.0
81+
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@main
8282
with:
8383
build_type: ${{ inputs.build_type || 'branch' }}
8484
branch: ${{ inputs.branch }}
@@ -94,7 +94,7 @@ jobs:
9494
packages: read
9595
pull-requests: read
9696
secrets: inherit # zizmor: ignore[secrets-inherit]
97-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@cuda-13.3.0
97+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
9898
with:
9999
arch: "amd64"
100100
branch: ${{ inputs.branch }}
@@ -114,7 +114,7 @@ jobs:
114114
packages: read
115115
pull-requests: read
116116
secrets: inherit # zizmor: ignore[secrets-inherit]
117-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-13.3.0
117+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
118118
with:
119119
build_type: ${{ inputs.build_type || 'branch' }}
120120
branch: ${{ inputs.branch }}
@@ -135,7 +135,7 @@ jobs:
135135
packages: read
136136
pull-requests: read
137137
secrets: inherit # zizmor: ignore[secrets-inherit]
138-
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@cuda-13.3.0
138+
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
139139
with:
140140
build_type: ${{ inputs.build_type || 'branch' }}
141141
branch: ${{ inputs.branch }}
@@ -153,7 +153,7 @@ jobs:
153153
packages: read
154154
pull-requests: read
155155
secrets: inherit # zizmor: ignore[secrets-inherit]
156-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-13.3.0
156+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
157157
with:
158158
build_type: ${{ inputs.build_type || 'branch' }}
159159
branch: ${{ inputs.branch }}
@@ -174,7 +174,7 @@ jobs:
174174
packages: read
175175
pull-requests: read
176176
secrets: inherit # zizmor: ignore[secrets-inherit]
177-
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@cuda-13.3.0
177+
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@main
178178
with:
179179
build_type: ${{ inputs.build_type || 'branch' }}
180180
branch: ${{ inputs.branch }}
@@ -192,7 +192,7 @@ jobs:
192192
packages: read
193193
pull-requests: read
194194
secrets: inherit # zizmor: ignore[secrets-inherit]
195-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-13.3.0
195+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
196196
with:
197197
build_type: ${{ inputs.build_type || 'branch' }}
198198
branch: ${{ inputs.branch }}
@@ -207,7 +207,7 @@ jobs:
207207
devcontainers:
208208
name: Build devcontainers
209209
secrets: inherit # zizmor: ignore[secrets-inherit]
210-
uses: rapidsai/shared-workflows/.github/workflows/build-devcontainers.yaml@cuda-13.3.0
210+
uses: rapidsai/shared-workflows/.github/workflows/build-devcontainers.yaml@main
211211
permissions:
212212
packages: write
213213
with:

.github/workflows/pr.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- wheel-test
3636
- devcontainer
3737
secrets: inherit # zizmor: ignore[secrets-inherit]
38-
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@cuda-13.3.0
38+
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@main
3939
if: always()
4040
with:
4141
needs: ${{ toJSON(needs) }}
@@ -47,7 +47,7 @@ jobs:
4747
packages: read
4848
pull-requests: read
4949
secrets: inherit # zizmor: ignore[secrets-inherit]
50-
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@cuda-13.3.0
50+
uses: rapidsai/shared-workflows/.github/workflows/changed-files.yaml@main
5151
with:
5252
files_yaml: |
5353
build_docs:
@@ -152,7 +152,7 @@ jobs:
152152
packages: read
153153
pull-requests: read
154154
secrets: inherit # zizmor: ignore[secrets-inherit]
155-
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@cuda-13.3.0
155+
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@main
156156
wheel-build-librapidsmpf:
157157
needs: checks
158158
permissions:
@@ -162,7 +162,7 @@ jobs:
162162
packages: read
163163
pull-requests: read
164164
secrets: inherit # zizmor: ignore[secrets-inherit]
165-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-13.3.0
165+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
166166
with:
167167
build_type: pull-request
168168
node_type: cpu8
@@ -180,7 +180,7 @@ jobs:
180180
packages: read
181181
pull-requests: read
182182
secrets: inherit # zizmor: ignore[secrets-inherit]
183-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-13.3.0
183+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
184184
with:
185185
build_type: pull-request
186186
node_type: cpu8
@@ -198,7 +198,7 @@ jobs:
198198
packages: read
199199
pull-requests: read
200200
secrets: inherit # zizmor: ignore[secrets-inherit]
201-
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@cuda-13.3.0
201+
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@main
202202
with:
203203
build_type: pull-request
204204
node_type: cpu8
@@ -217,7 +217,7 @@ jobs:
217217
packages: read
218218
pull-requests: read
219219
secrets: inherit # zizmor: ignore[secrets-inherit]
220-
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@cuda-13.3.0
220+
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
221221
with:
222222
build_type: pull-request
223223
container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000"
@@ -231,7 +231,7 @@ jobs:
231231
packages: read
232232
pull-requests: read
233233
secrets: inherit # zizmor: ignore[secrets-inherit]
234-
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@cuda-13.3.0
234+
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@main
235235
with:
236236
build_type: pull-request
237237
node_type: cpu8
@@ -245,7 +245,7 @@ jobs:
245245
packages: read
246246
pull-requests: read
247247
secrets: inherit # zizmor: ignore[secrets-inherit]
248-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@cuda-13.3.0
248+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
249249
with:
250250
build_type: pull-request
251251
script: "ci/cpp_linters.sh"
@@ -260,7 +260,7 @@ jobs:
260260
packages: read
261261
pull-requests: read
262262
secrets: inherit # zizmor: ignore[secrets-inherit]
263-
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@cuda-13.3.0
263+
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main
264264
with:
265265
build_type: pull-request
266266
container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000"
@@ -274,7 +274,7 @@ jobs:
274274
packages: read
275275
pull-requests: read
276276
secrets: inherit # zizmor: ignore[secrets-inherit]
277-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@cuda-13.3.0
277+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
278278
with:
279279
build_type: pull-request
280280
script: "ci/test_cpp_memcheck.sh"
@@ -288,7 +288,7 @@ jobs:
288288
packages: read
289289
pull-requests: read
290290
secrets: inherit # zizmor: ignore[secrets-inherit]
291-
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@cuda-13.3.0
291+
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@main
292292
with:
293293
build_type: pull-request
294294
script: ci/build_python.sh
@@ -304,7 +304,7 @@ jobs:
304304
packages: read
305305
pull-requests: read
306306
secrets: inherit # zizmor: ignore[secrets-inherit]
307-
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@cuda-13.3.0
307+
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main
308308
with:
309309
build_type: pull-request
310310
container-options: "--cap-add CAP_SYS_PTRACE --shm-size=8g --ulimit=nofile=1000000:1000000"
@@ -319,7 +319,7 @@ jobs:
319319
packages: read
320320
pull-requests: read
321321
secrets: inherit # zizmor: ignore[secrets-inherit]
322-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@cuda-13.3.0
322+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
323323
if: fromJSON(needs.changed-files.outputs.changed_file_groups).build_docs
324324
with:
325325
build_type: pull-request
@@ -337,7 +337,7 @@ jobs:
337337
packages: read
338338
pull-requests: read
339339
secrets: inherit # zizmor: ignore[secrets-inherit]
340-
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@cuda-13.3.0
340+
uses: rapidsai/shared-workflows/.github/workflows/build-in-devcontainer.yaml@main
341341
with:
342342
arch: '["amd64", "arm64"]'
343343
cuda: '["13.3"]'

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
packages: read
3434
pull-requests: read
3535
secrets: inherit # zizmor: ignore[secrets-inherit]
36-
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@cuda-13.3.0
36+
uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-tests.yaml@main
3737
with:
3838
build_type: ${{ inputs.build_type }}
3939
branch: ${{ inputs.branch }}
@@ -49,7 +49,7 @@ jobs:
4949
packages: read
5050
pull-requests: read
5151
secrets: inherit # zizmor: ignore[secrets-inherit]
52-
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@cuda-13.3.0
52+
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
5353
with:
5454
build_type: ${{ inputs.build_type }}
5555
branch: ${{ inputs.branch }}
@@ -66,7 +66,7 @@ jobs:
6666
packages: read
6767
pull-requests: read
6868
secrets: inherit # zizmor: ignore[secrets-inherit]
69-
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@cuda-13.3.0
69+
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@main
7070
with:
7171
build_type: ${{ inputs.build_type }}
7272
branch: ${{ inputs.branch }}
@@ -83,7 +83,7 @@ jobs:
8383
packages: read
8484
pull-requests: read
8585
secrets: inherit # zizmor: ignore[secrets-inherit]
86-
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@cuda-13.3.0
86+
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@main
8787
with:
8888
build_type: ${{ inputs.build_type }}
8989
branch: ${{ inputs.branch }}

cpp/include/rapidsmpf/utils/misc.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,8 @@ constexpr To safe_cast(
401401
if (!std::in_range<To>(value)) {
402402
throw std::overflow_error(
403403
"RapidsMPF cast error at: " + std::string(loc.file_name()) + ":"
404-
+ std::to_string(loc.line()) + ", value out of range"
404+
+ std::to_string(loc.line())
405+
+ ", value out of range (value=" + std::to_string(value) + ")"
405406
);
406407
}
407408
return static_cast<To>(value);

cpp/tests/test_misc.cpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
#include <cstdint>
77
#include <limits>
8+
#include <string>
89

910
#include <gtest/gtest.h>
1011

@@ -199,7 +200,7 @@ TEST(MiscTest, SafeCastFloatingPointConversions) {
199200
EXPECT_EQ(safe_cast<int>(-2.7), -2);
200201
}
201202

202-
// Test that error messages include source location
203+
// Test that error messages include source location & value.
203204
TEST(MiscTest, SafeCastErrorMessageContainsLocation) {
204205
try {
205206
safe_cast<unsigned>(-1);
@@ -211,9 +212,24 @@ TEST(MiscTest, SafeCastErrorMessageContainsLocation) {
211212
<< "Error message should contain file name: " << msg;
212213
EXPECT_TRUE(msg.find("RapidsMPF cast error") != std::string::npos)
213214
<< "Error message should contain 'RapidsMPF cast error': " << msg;
215+
EXPECT_TRUE(msg.find("value=-1") != std::string::npos)
216+
<< "Error message should contain 'value=-1': " << msg;
214217
}
215218
}
216219

220+
// Test that error messages include large unsigned source values.
221+
TEST(MiscTest, SafeCastErrorMessageContainsLargeUnsignedValue) {
222+
std::string msg;
223+
try {
224+
safe_cast<std::int64_t>(UINT64_MAX);
225+
FAIL() << "Expected std::overflow_error";
226+
} catch (const std::overflow_error& e) {
227+
msg = e.what();
228+
}
229+
EXPECT_TRUE(msg.find("value=" + std::to_string(UINT64_MAX)) != std::string::npos)
230+
<< "Error message should contain large unsigned value: " << msg;
231+
}
232+
217233
// Test zero and boundary values
218234
TEST(MiscTest, SafeCastZeroAndBoundaries) {
219235
// Zero should always work

0 commit comments

Comments
 (0)