Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
dedisp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ResearchAndDevelopment
dedisp
Commits
8bac07d6
Commit
8bac07d6
authored
Apr 1, 2021
by
Steven van der Vlugt
Browse files
Options
Downloads
Patches
Plain Diff
removed FDDGPUPlan host memory check, FDDGPUPlan memory utilization has been drastically reduced
parent
3274af99
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fdd/FDDGPUPlan.cpp
+1
-21
1 addition, 21 deletions
src/fdd/FDDGPUPlan.cpp
with
1 addition
and
21 deletions
src/fdd/FDDGPUPlan.cpp
+
1
−
21
View file @
8bac07d6
...
@@ -237,25 +237,6 @@ void FDDGPUPlan::execute_gpu(
...
@@ -237,25 +237,6 @@ void FDDGPUPlan::execute_gpu(
}
}
d_memory_free
+=
d_memory_in_use
;
d_memory_free
+=
d_memory_in_use
;
// For host side
size_t
h_memory_free
=
get_free_memory
();
// / std::pow(1024, 1); //current free host memory in MBytes -> Bytes
size_t
h_memory_required
=
sizeof_data_t_nu
*
nchan_buffers
+
sizeof_data_x_dm
*
ndm_buffers
;
//in Bytes
size_t
h_memory_reserved
=
h_memory_free
*
0.05
;
//5% margin
if
((
h_memory_required
+
h_memory_reserved
)
/
std
::
pow
(
1024
,
3
)
>
(
h_memory_free
/
std
::
pow
(
1024
,
1
)))
{
// ToDo: host memory requirement might be reduced by introducing multiple buffering on the output copy
/* Note: does not take uninitialized application memory in to account!
* E.g. a malloc for the paged output buffer on the application side does not register the buffer as system memory in use
* Over-using host memory for the application + plan is the responsibiltiy of the application,
* here we can only check for the memory used by the plan itself.*/
std
::
cout
<<
"Host memory total = "
<<
get_total_memory
()
/
std
::
pow
(
1024
,
1
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host memory free = "
<<
h_memory_free
/
std
::
pow
(
1024
,
1
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host Memory required by FDDGPUPlan = "
<<
h_memory_required
/
std
::
pow
(
1024
,
3
)
<<
" Gb"
<<
std
::
endl
;
throw
std
::
runtime_error
(
"FDDGPUPlan runtime error: required host memory is too large"
);
}
// Iteratively search for a maximum amount of ndm_buffers, with safety margin
// Iteratively search for a maximum amount of ndm_buffers, with safety margin
// Make sure that it fits on device memory
// Make sure that it fits on device memory
while
((
ndm_buffers
*
ndm_batch_max
)
<
ndm
&&
while
((
ndm_buffers
*
ndm_batch_max
)
<
ndm
&&
...
@@ -276,8 +257,7 @@ void FDDGPUPlan::execute_gpu(
...
@@ -276,8 +257,7 @@ void FDDGPUPlan::execute_gpu(
std
::
cout
<<
"Device memory free = "
<<
d_memory_free
/
std
::
pow
(
1024
,
3
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Device memory free = "
<<
d_memory_free
/
std
::
pow
(
1024
,
3
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Device Memory required = "
<<
d_memory_required
/
std
::
pow
(
1024
,
3
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Device Memory required = "
<<
d_memory_required
/
std
::
pow
(
1024
,
3
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host memory total = "
<<
get_total_memory
()
/
std
::
pow
(
1024
,
1
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host memory total = "
<<
get_total_memory
()
/
std
::
pow
(
1024
,
1
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host memory free = "
<<
h_memory_free
/
std
::
pow
(
1024
,
1
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host memory free = "
<<
get_free_memory
()
/
std
::
pow
(
1024
,
1
)
<<
" Gb"
<<
std
::
endl
;
std
::
cout
<<
"Host Memory required by FDDGPUPlan = "
<<
h_memory_required
/
std
::
pow
(
1024
,
3
)
<<
" Gb"
<<
std
::
endl
;
#endif
#endif
// Allocate memory
// Allocate memory
...
...
This diff is collapsed.
Click to expand it.
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