Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
e4dc238f
Unverified
Commit
e4dc238f
authored
Feb 11, 2023
by
Truman, Wentao TIAN
Committed by
GitHub
Feb 11, 2023
Browse files
[CUDA] fix integer overflow (#5706)
parent
8935591f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/io/cuda/cuda_row_data.cpp
src/io/cuda/cuda_row_data.cpp
+1
-1
No files found.
src/io/cuda/cuda_row_data.cpp
View file @
e4dc238f
...
...
@@ -323,7 +323,7 @@ void CUDARowData::GetDenseDataPartitioned(const BIN_TYPE* row_wise_data, std::ve
const
int
partition_column_end
=
feature_partition_column_index_offsets_
[
i
+
1
];
const
int
num_columns_in_cur_partition
=
partition_column_end
-
partition_column_start
;
for
(
data_size_t
data_index
=
start
;
data_index
<
end
;
++
data_index
)
{
const
size_t
data_offset
=
offset
+
data_index
*
num_columns_in_cur_partition
;
const
size_t
data_offset
=
offset
+
static_cast
<
size_t
>
(
data_index
)
*
num_columns_in_cur_partition
;
const
size_t
read_data_offset
=
static_cast
<
size_t
>
(
data_index
)
*
num_total_columns
;
for
(
int
column_index
=
0
;
column_index
<
num_columns_in_cur_partition
;
++
column_index
)
{
const
size_t
true_column_index
=
read_data_offset
+
column_index
+
partition_column_start
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment