Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gpma_bfs
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Recolic
gpma_bfs
Commits
f6e39a7a
There was an error fetching the commit references. Please try again later.
Commit
f6e39a7a
authored
5 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
fix more loss of anySync for cub::? functions
parent
6f5ab3d5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gpma.cuh
+2
-1
2 additions, 1 deletion
gpma.cuh
utils.cuh
+2
-3
2 additions, 3 deletions
utils.cuh
with
4 additions
and
4 deletions
gpma.cuh
+
2
−
1
View file @
f6e39a7a
...
@@ -160,6 +160,7 @@ __device__ void cub_sort_key_value(KEY_TYPE *keys, VALUE_TYPE *values, SIZE_TYPE
...
@@ -160,6 +160,7 @@ __device__ void cub_sort_key_value(KEY_TYPE *keys, VALUE_TYPE *values, SIZE_TYPE
cErr
(
cub
::
DeviceRadixSort
::
SortPairs
(
d_temp_storage
,
temp_storage_bytes
,
keys
,
tmp_keys
,
values
,
tmp_values
,
size
));
cErr
(
cub
::
DeviceRadixSort
::
SortPairs
(
d_temp_storage
,
temp_storage_bytes
,
keys
,
tmp_keys
,
values
,
tmp_values
,
size
));
cErr
(
cudaMalloc
(
&
d_temp_storage
,
temp_storage_bytes
));
cErr
(
cudaMalloc
(
&
d_temp_storage
,
temp_storage_bytes
));
cErr
(
cub
::
DeviceRadixSort
::
SortPairs
(
d_temp_storage
,
temp_storage_bytes
,
keys
,
tmp_keys
,
values
,
tmp_values
,
size
));
cErr
(
cub
::
DeviceRadixSort
::
SortPairs
(
d_temp_storage
,
temp_storage_bytes
,
keys
,
tmp_keys
,
values
,
tmp_values
,
size
));
anySync
<
GPU
>
();
SIZE_TYPE
THREADS_NUM
=
128
;
SIZE_TYPE
THREADS_NUM
=
128
;
SIZE_TYPE
BLOCKS_NUM
=
CALC_BLOCKS_NUM
(
THREADS_NUM
,
size
);
SIZE_TYPE
BLOCKS_NUM
=
CALC_BLOCKS_NUM
(
THREADS_NUM
,
size
);
...
@@ -771,7 +772,7 @@ template <dev_type_t DEV>
...
@@ -771,7 +772,7 @@ template <dev_type_t DEV>
void
rebalance_batch
(
SIZE_TYPE
level
,
SIZE_TYPE
seg_length
,
KEY_TYPE
*
keys
,
VALUE_TYPE
*
values
,
SIZE_TYPE
*
update_nodes
,
KEY_TYPE
*
update_keys
,
VALUE_TYPE
*
update_values
,
SIZE_TYPE
update_size
,
SIZE_TYPE
*
unique_update_nodes
,
SIZE_TYPE
*
update_offset
,
SIZE_TYPE
unique_update_size
,
SIZE_TYPE
lower_bound
,
SIZE_TYPE
upper_bound
,
SIZE_TYPE
*
row_offset
)
{
void
rebalance_batch
(
SIZE_TYPE
level
,
SIZE_TYPE
seg_length
,
KEY_TYPE
*
keys
,
VALUE_TYPE
*
values
,
SIZE_TYPE
*
update_nodes
,
KEY_TYPE
*
update_keys
,
VALUE_TYPE
*
update_values
,
SIZE_TYPE
update_size
,
SIZE_TYPE
*
unique_update_nodes
,
SIZE_TYPE
*
update_offset
,
SIZE_TYPE
unique_update_size
,
SIZE_TYPE
lower_bound
,
SIZE_TYPE
upper_bound
,
SIZE_TYPE
*
row_offset
)
{
// TryInsert+ is this function.
// TryInsert+ is this function.
SIZE_TYPE
update_width
=
seg_length
<<
level
;
// real seg_length of this level
SIZE_TYPE
update_width
=
seg_length
<<
level
;
// real seg_length of this level
if
(
false
&&
update_width
<=
1024
)
{
if
(
update_width
<=
1024
)
{
assert
(
IsPowerOfTwo
(
update_width
));
assert
(
IsPowerOfTwo
(
update_width
));
if
(
DEV
==
GPU
)
{
if
(
DEV
==
GPU
)
{
// func pointer for each template
// func pointer for each template
...
...
This diff is collapsed.
Click to expand it.
utils.cuh
+
2
−
3
View file @
f6e39a7a
...
@@ -100,8 +100,8 @@ void anyRunLengthEncoding(const SIZE_TYPE *inputVec, SIZE_TYPE inputLen, SIZE_TY
...
@@ -100,8 +100,8 @@ void anyRunLengthEncoding(const SIZE_TYPE *inputVec, SIZE_TYPE inputLen, SIZE_TY
cErr
(
cub
::
DeviceRunLengthEncode
::
Encode
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
outputLenVec
,
outputLen
,
inputLen
));
cErr
(
cub
::
DeviceRunLengthEncode
::
Encode
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
outputLenVec
,
outputLen
,
inputLen
));
anySync
<
DEV
>
();
// TODO: test and remove them.
anySync
<
DEV
>
();
// TODO: test and remove them.
anyMalloc
<
DEV
>
(
&
temp_storage
,
temp_storage_bytes
);
anyMalloc
<
DEV
>
(
&
temp_storage
,
temp_storage_bytes
);
anySync
<
DEV
>
();
cErr
(
cub
::
DeviceRunLengthEncode
::
Encode
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
outputLenVec
,
outputLen
,
inputLen
));
cErr
(
cub
::
DeviceRunLengthEncode
::
Encode
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
outputLenVec
,
outputLen
,
inputLen
));
anySync
<
DEV
>
();
anyFree
<
DEV
>
(
temp_storage
);
anyFree
<
DEV
>
(
temp_storage
);
SIZE_TYPE
tmp
;
SIZE_TYPE
tmp
;
...
@@ -124,10 +124,9 @@ __host__ __device__ void cudaExclusiveSum(const SIZE_TYPE *inputVec, SIZE_TYPE *
...
@@ -124,10 +124,9 @@ __host__ __device__ void cudaExclusiveSum(const SIZE_TYPE *inputVec, SIZE_TYPE *
void
*
temp_storage
=
NULL
;
void
*
temp_storage
=
NULL
;
size_t
temp_storage_bytes
=
0
;
size_t
temp_storage_bytes
=
0
;
cErr
(
cub
::
DeviceScan
::
ExclusiveSum
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
len
));
cErr
(
cub
::
DeviceScan
::
ExclusiveSum
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
len
));
anySync
<
GPU
>
();
anyMalloc
<
GPU
>
(
&
temp_storage
,
temp_storage_bytes
);
anyMalloc
<
GPU
>
(
&
temp_storage
,
temp_storage_bytes
);
anySync
<
GPU
>
();
cErr
(
cub
::
DeviceScan
::
ExclusiveSum
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
len
));
cErr
(
cub
::
DeviceScan
::
ExclusiveSum
(
temp_storage
,
temp_storage_bytes
,
inputVec
,
outputVec
,
len
));
anySync
<
GPU
>
();
anyFree
<
GPU
>
(
temp_storage
);
anyFree
<
GPU
>
(
temp_storage
);
}
}
template
<
dev_type_t
DEV
>
template
<
dev_type_t
DEV
>
...
...
This diff is collapsed.
Click to expand it.
Recolic
@root
mentioned in issue
#2 (closed)
·
5 years ago
mentioned in issue
#2 (closed)
mentioned in issue #2
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment