co_manager shortcuting the scheduler#566
Draft
BrieucNicolas wants to merge 1 commit intoICLDisco:masterfrom
Draft
co_manager shortcuting the scheduler#566BrieucNicolas wants to merge 1 commit intoICLDisco:masterfrom
BrieucNicolas wants to merge 1 commit intoICLDisco:masterfrom
Conversation
1eaf883 to
b7a0309
Compare
fix for multiple gpus Added debug output and some documentation, error tolerance for multiple gpu and no manager, refactored loop in insert_function, got rid of deadlock
b7a0309 to
b535ab2
Compare
devreal
requested changes
Aug 12, 2023
| if (PARSEC_DTD_FLUSH_TC_ID == current_task->task_class->task_class_id) | ||
| { | ||
| PARSEC_DEBUG_VERBOSE(10, parsec_gpu_output_stream,"GPU[%s]: Thread %d scheduling task %s at %s:%d", | ||
| ((parsec_device_module_t*)*co_manager_tls_val)->name, es->th_id, |
Contributor
There was a problem hiding this comment.
These casts are not necessary (here and elsewhere)
| */ | ||
| while(1) { | ||
| rc = gpu_device->mutex; | ||
| rc = rc1 = gpu_device->mutex; |
Contributor
There was a problem hiding this comment.
I don't like rc1 for its lack of information. I suggest using a boolean variable like was_first_co_manager (you get the point :)) that is set to true if the CAS below succeeds and rc == 1.
| PARSEC_DEBUG_VERBOSE(4, parsec_gpu_output_stream,"GPU[%s]: gpu_task %p completed by co-manager %d at %s:%d", gpu_device->super.name, | ||
| gpu_task, es->th_id, __FILE__, __LINE__); | ||
| parsec_atomic_fetch_dec_int32( &(gpu_device->complete_mutex) ); | ||
| parsec_list_push_back(gpu_tasks_to_free, (parsec_list_item_t*)gpu_task); |
Contributor
There was a problem hiding this comment.
Why do we have to accumulate task objects here? Can they not be free'd directly?
Contributor
Author
There was a problem hiding this comment.
Yes, thank you for pointing that out. i found a fix for this, it will be applied
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuation of #509 adding a shortcut when discovering tasks in the dtd. The co-manager executes ready tasks discovered during completion immediatly instead of scheduling them