-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split up mixed-join kernels source files (#10671)
Split up `mixed_join_kernels.cu` and `mixed_join_size_kernels.cu` to improve overall build time. Currently these take about 30 minutes each on the gpuCI build. Example of a recent build metrics report: https://gpuci.gpuopenanalytics.com/job/rapidsai/job/gpuci-22-06/job/cudf/job/prb/job/cudf-cpu-cuda-build/CUDA=11.5/164/Build_20Metrics_20Report/ The nulls and non-nulls definitions are placed into separate source files. The kernel source used for `mixed_join_kernels.cu` (both null and non-null) is moved to `mixed_join_kernel.cuh` and the nulls definition is moved to `mixed_join_kernel_nulls.cu`. For consistency the `mixed_join_kernels.cu` name is changed to just `mixed_join_kernel.cu` since it now only contains one definition. This same pattern applies to `mixed_join_size_kernels.cu` splitting into `mixed_join_size_kernel.cuh`, `mixed_join_size_kernel_nulls.cu` and `mixed_join_size_kernel.cu` No function behavior or actual code generation has changed. The source code has just moved into more source files to help better parallelize and speed up the build process. This improves compile time by 10% for a release build and ~25% for a debug build. Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Robert Maynard (https://github.com/robertmaynard) - Nghia Truong (https://github.com/ttnghia) - Bradley Dice (https://github.com/bdice) URL: #10671
- Loading branch information
1 parent
08cd428
commit 565f474
Showing
7 changed files
with
155 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "mixed_join_kernel.cuh" | ||
|
||
namespace cudf { | ||
namespace detail { | ||
|
||
template __global__ void mixed_join<DEFAULT_JOIN_BLOCK_SIZE, false>( | ||
table_device_view left_table, | ||
table_device_view right_table, | ||
table_device_view probe, | ||
table_device_view build, | ||
row_equality const equality_probe, | ||
join_kind const join_type, | ||
cudf::detail::mixed_multimap_type::device_view hash_table_view, | ||
size_type* join_output_l, | ||
size_type* join_output_r, | ||
cudf::ast::detail::expression_device_view device_expression_data, | ||
cudf::size_type const* join_result_offsets, | ||
bool const swap_tables); | ||
|
||
} // namespace detail | ||
|
||
} // namespace cudf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "mixed_join_kernel.cuh" | ||
|
||
namespace cudf { | ||
namespace detail { | ||
|
||
template __global__ void mixed_join<DEFAULT_JOIN_BLOCK_SIZE, true>( | ||
table_device_view left_table, | ||
table_device_view right_table, | ||
table_device_view probe, | ||
table_device_view build, | ||
row_equality const equality_probe, | ||
join_kind const join_type, | ||
cudf::detail::mixed_multimap_type::device_view hash_table_view, | ||
size_type* join_output_l, | ||
size_type* join_output_r, | ||
cudf::ast::detail::expression_device_view device_expression_data, | ||
cudf::size_type const* join_result_offsets, | ||
bool const swap_tables); | ||
|
||
} // namespace detail | ||
|
||
} // namespace cudf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "mixed_join_size_kernel.cuh" | ||
|
||
namespace cudf { | ||
namespace detail { | ||
|
||
template __global__ void compute_mixed_join_output_size<DEFAULT_JOIN_BLOCK_SIZE, false>( | ||
table_device_view left_table, | ||
table_device_view right_table, | ||
table_device_view probe, | ||
table_device_view build, | ||
row_equality const equality_probe, | ||
join_kind const join_type, | ||
cudf::detail::mixed_multimap_type::device_view hash_table_view, | ||
ast::detail::expression_device_view device_expression_data, | ||
bool const swap_tables, | ||
std::size_t* output_size, | ||
cudf::device_span<cudf::size_type> matches_per_row); | ||
|
||
} // namespace detail | ||
} // namespace cudf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright (c) 2022, NVIDIA CORPORATION. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#include "mixed_join_size_kernel.cuh" | ||
|
||
namespace cudf { | ||
namespace detail { | ||
|
||
template __global__ void compute_mixed_join_output_size<DEFAULT_JOIN_BLOCK_SIZE, true>( | ||
table_device_view left_table, | ||
table_device_view right_table, | ||
table_device_view probe, | ||
table_device_view build, | ||
row_equality const equality_probe, | ||
join_kind const join_type, | ||
cudf::detail::mixed_multimap_type::device_view hash_table_view, | ||
ast::detail::expression_device_view device_expression_data, | ||
bool const swap_tables, | ||
std::size_t* output_size, | ||
cudf::device_span<cudf::size_type> matches_per_row); | ||
|
||
} // namespace detail | ||
} // namespace cudf |