Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYCL] Host task implementation #1471

Merged
merged 195 commits into from
May 20, 2020
Merged
Changes from 1 commit
Commits
Show all changes
195 commits
Select commit Hold shift + click to select a range
b31cb8e
[SYCL] Allow for creating host accessor without blocked event.
Mar 2, 2020
f3bf37a
[SYCL] Tests for host/interop task
Feb 26, 2020
faded84
[SYCL] Remove unused parameter
Mar 2, 2020
253086f
[SYCL] Some syntax improvements
Mar 3, 2020
cacb056
[SYCL] Sample impl of host task through event
Mar 4, 2020
37106ea
Merge branch 'sycl' into private/s-kanaev/interop-task
Mar 5, 2020
1a79e3f
[SYCL] Sample implementation without OpenCL specific calls.
Mar 6, 2020
9057a23
Merge branch 'sycl' into private/s-kanaev/interop-task
Mar 6, 2020
93cffcc
[SYCL] Only leave event-callback
Mar 6, 2020
3790b3a
[SYCL] Fix typo
Mar 10, 2020
4255434
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 10, 2020
dc0ab02
[SYCL] Allow for running lit-tests with threads.
Mar 10, 2020
0d95eaa
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 11, 2020
f0df349
[SYCL] A more sophisticated thread pool impl
Mar 11, 2020
ea577f6
[SYCL] Proper use of fork() in assertion test
Mar 12, 2020
99f64fb
[SYCL] Fix style issue
Mar 12, 2020
9c8b1a1
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 12, 2020
529d4dc
[SYCL] Fix some typos. Lazy initialization of thread pool.
Mar 12, 2020
4d04655
[SYCL] Employ event::when_complete instead of piEventSetCallback
Mar 13, 2020
1e3bfe4
[SYCL] Host-task test
Mar 13, 2020
fc70b03
[SYCL] Remove unwanted include
Mar 13, 2020
1429f9d
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 16, 2020
eaaefd3
[SYCL] Worked on host-task
Mar 18, 2020
1172ca1
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 20, 2020
9f3d2d4
[SYCL] Reimplement event::when_complete through host_task
Mar 23, 2020
92917a0
[SYCL] Worked on host task
Mar 26, 2020
578d422
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 26, 2020
8e3dcd8
[SYCL] Fix merge issue
Mar 27, 2020
2c2c713
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 27, 2020
14458e3
[SYCL] Fix assert test
Mar 29, 2020
a9ad4df
Merge branch 'sycl' into private/s-kanaev/event-callback
Mar 29, 2020
dde6af5
[SYCL] Event for host-task
Mar 30, 2020
e4c6764
[SYCL] Add test stub
Mar 30, 2020
eb71004
[SYCL] Distinct command for host task representation.
Mar 31, 2020
90cac7c
[SYCL] Depend device alloca cmd on cg's operating with linked host al…
Apr 1, 2020
1473f5d
[SYCL] Remove spare code. Wait for dependency events.
Apr 1, 2020
bfb0572
[SYCL] Remove spare code
Apr 1, 2020
9f68320
[SYCL] Fix code-style issue
Apr 1, 2020
442f905
[SYCL] Move handling of multiple contexts out of Command::prepareEven…
Apr 2, 2020
380b009
[SYCL] Output values in test
Apr 3, 2020
cee7e47
[SYCL] Add CHECK-sequence to test
Apr 3, 2020
b9003dc
[SYCL] Eliminate use of event callback during glue-ing of events from…
Apr 3, 2020
667729d
[SYCL] Fix some comments
Apr 3, 2020
072a850
[SYCL] Eliminate HostTaskCommand
Apr 3, 2020
c65759d
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 3, 2020
40f4a32
[SYCL] Fix codestyle issues
Apr 6, 2020
d7fe436
[SYCL] Fix runtime issue
Apr 7, 2020
89d6b44
[SYCL] Fix codestyle issue
Apr 7, 2020
08b31f5
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 8, 2020
9f97076
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 9, 2020
6537bb4
[SYCL] Fix typo in sycl/source/detail/queue_impl.hpp
s-kanaev Apr 9, 2020
5388fd4
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 13, 2020
7ce22fe
[SYCL] Fix some review comments
Apr 13, 2020
a23c167
[SYCL] Fix indentation
Apr 13, 2020
fc10c6a
[SYCL] Remove unrelated change
Apr 14, 2020
e326ed0
[SYCL] Eliminate Command::prepareEvents()
Apr 14, 2020
d046775
[SYCL] Add empty command/node right after host-task
Apr 15, 2020
cf3bbf3
[NFC] [SYCL] Shift DispatchHostTask lambda to functor to reduce size …
Apr 15, 2020
35fdcde
[SYCL] Eliminate use of addCG when connecting multiple context.
Apr 15, 2020
427c81d
[SYCL] Fix indentation
Apr 15, 2020
1cc0885
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 15, 2020
9a936ee
[SYCL] Fix build issue
Apr 16, 2020
82296ec
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 16, 2020
a1c23d5
[SYCL] Add empty command for connecting command
Apr 16, 2020
8427b4a
[NFC] [SYCL] Split method into smaller ones
Apr 16, 2020
ff03307
[SYCL] Fix build issue
Apr 16, 2020
49ed81e
[SYCL] Remove unneeded line
Apr 16, 2020
d3a5cf9
[SYCL] Worked on fixing of race condition.
Apr 17, 2020
32f2f1b
[SYCL] Fix runtime issue. Remove debug outputs.
Apr 19, 2020
cb10eca
[SYCL] Remove '#if 1'
Apr 19, 2020
58246a7
[SYCL] Don't store context in CGHostTask. Remove commented code
Apr 19, 2020
96e4d4b
[SYCL] Fix some review comments.
Apr 19, 2020
30156f2
[SYCL] Remove unneeded code.
Apr 19, 2020
269319d
[NFC] [SYCL] Fix codestyle issues
Apr 19, 2020
212a484
[NFC] [SYCL] Remove unused code
Apr 19, 2020
881f5c9
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 19, 2020
07133a7
[NFC] [SYCL] Fix codestyle issues
Apr 19, 2020
8a6ee30
[NFC] [SYCL] Fix codestyle issue
Apr 20, 2020
ff5023c
[SYCL] Employ a hack to prevent invalid read in some cases
Apr 20, 2020
8a567ba
[SYCL] Enqueue dependant commands.
Apr 20, 2020
dd4ac89
[SYCL] Worked on fixing runtime issue
Apr 21, 2020
0724914
[SYCL] Modify test
Apr 21, 2020
2e3fbe1
[SYCL] Worked on fixing runtime issue
Apr 21, 2020
0465f2a
[SYCL] Fix test
Apr 21, 2020
c4ab0f1
[SYCL] Fix codestyle issue
Apr 21, 2020
741e257
[SYCL] Fix test
Apr 22, 2020
d00f031
[SYCL] Slight fix
Apr 22, 2020
2f2abf3
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 22, 2020
b4a2a47
[SYCL] Revert patch of test for assert
Apr 22, 2020
092d887
[NFC] [SYCL] Add description of new environment variable.
Apr 22, 2020
05a6558
[SYCL] Fix windows build.
Apr 22, 2020
b193031
[SYCL] Init buffer with proper data
Apr 22, 2020
a04c01f
[SYCL] Convert back to single MBlockedCmd in requirement
Apr 24, 2020
410654b
[SYCL] Address comments:
Apr 24, 2020
bad3845
[SYCL] Remove unused code
Apr 24, 2020
6ae8754
[SYCL] Throw 'out of host memory' exception upon failed allocation of…
Apr 24, 2020
67a98e0
[SYCL] Fix typo
Apr 24, 2020
b12d9ee
[SYCL] Don't store empty command in blocked cmds of requirement upon …
Apr 24, 2020
931128b
[SYCL] Fix runtime issue. Make code look cleaner.
Apr 24, 2020
72dbfa3
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 24, 2020
5ee3ba5
[SYCL] Fix style issue
Apr 24, 2020
14a47a2
[SYCL] Add comment
Apr 27, 2020
038495f
[SYCL] Eliminate explicit calls to setComplete() in users of EmptyCom…
Apr 27, 2020
083abeb
[SYCL] Enforce asserts in event_impl::setComplete()
Apr 27, 2020
c929d8b
[SYCL] Employ piEventSetStatus in event_impl::setComplete().
Apr 27, 2020
1674878
[SYCL] Address some review comments.
Apr 27, 2020
f41a605
[SYCL] Move some mthods from Command to Scheduler::GraphBuilder
Apr 27, 2020
857d433
[SYCL] Simpify DispatchHostTask::findUserEmptyCommand() method.
Apr 28, 2020
faf3fa1
[SYCL] Simplify loop
Apr 28, 2020
02c4cad
[SYCL] Remove unwanted changes from lit.cfg.py
Apr 28, 2020
5d15247
[SYCL] Remove unwanted change.
Apr 28, 2020
e366310
[SYCL] Resolve style issues
Apr 28, 2020
2b1335b
[SYCL] Rename HOST_TASK_CODEPLAY to CODEPLAY_HOST_TASK
Apr 28, 2020
d9ec78a
[SYCL] Fix build issue
Apr 28, 2020
0e38582
[SYCL] Move changes in addCG to distinct function.
Apr 28, 2020
1b62aed
[SYCL] Fix build issue
Apr 28, 2020
deb3e67
[SYCL] Remove unneeded comment
Apr 28, 2020
eaa8005
[SYCL] Fix runtime issue.
Apr 28, 2020
36dffd9
[SYCL] Remove unwanted changes
Apr 28, 2020
37917a7
[SYCL] Wait for host events in first place
Apr 28, 2020
eab005d
[SYCL] Employ common wait mechanism upon enqueueing command for waiting.
Apr 28, 2020
239afd8
Revert "[SYCL] Remove unwanted changes"
Apr 28, 2020
e73f49f
[SYCL] Stylistic issue
Apr 28, 2020
c96566d
[SYCL] Update state of event upon setting of context
Apr 28, 2020
68c6cc8
[SYCL] Fix race-condition
Apr 28, 2020
13fa22b
[SYCL] Fix sporadic segfault in scheduler
Apr 28, 2020
c77f7f9
[SYCL] Properly release resources in scheduler unit-test
Apr 28, 2020
9d3d186
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 28, 2020
78e032c
[SYCL] Fix style issue
Apr 28, 2020
4216af1
[SYCL] Fix build issue (merge glitch).
Apr 29, 2020
ece3bcb
[SYCL] Fix build issue (merge glitch).
Apr 29, 2020
565bd83
[SYCL] Fix build issue (merge glitch).
Apr 29, 2020
30321a1
[SYCL] Employ C++14 feature in thread pool.
Apr 29, 2020
14c9476
[SYCL] Fix ABI test
Apr 29, 2020
a17d607
[SYCL] Set pi trace level
Apr 29, 2020
7caf17b
[SYCL] Fix ABI test.
Apr 29, 2020
b6b924c
Revert "Revert "[SYCL] Remove unwanted changes""
Apr 29, 2020
a30c3a0
[SYCL] Remove redundant test
Apr 29, 2020
fc847dd
Merge branch 'sycl' into private/s-kanaev/event-callback
Apr 29, 2020
b3efd81
[SYCL] Fix style issue
Apr 29, 2020
17a9faf
[SYCL] Update test
Apr 29, 2020
2f6af3b
[SYCL] Runtime fixes
Apr 29, 2020
c309777
Revert "[SYCL] Remove unwanted changes"
Apr 30, 2020
aa4c679
[SYCL] Fix runtime issue for linked alloca deps
Apr 30, 2020
8b6b04e
Merge branch 'sycl' into private/s-kanaev/event-callback2
Apr 30, 2020
a4bc8f0
[SYCL] Fix merge glitch
Apr 30, 2020
462163e
Merge branch 'sycl' into private/s-kanaev/event-callback
May 6, 2020
4a8de92
[SYCL] Fix merge glitch
May 6, 2020
16ca481
[SYCL] Fix typo
May 6, 2020
294bd9d
[SYCL] A more proper way to unchaining deps of linked alloca's
May 6, 2020
c094e9a
[SYCL] Fix another race-condition.
May 6, 2020
06f3c5e
Merge branch 'sycl' into private/s-kanaev/event-callback
May 7, 2020
ba3d009
[SYCL] Address some review comments.
May 7, 2020
6052e85
[SYCL] Set proper target tripple in test
May 7, 2020
471fb78
[SYCL] Employ std::future properly in the test
May 7, 2020
ab49e2a
[SYCL] Store command in DispatchHostTask instead of a lot of fields.
May 7, 2020
e44ad31
[SYCL] Resolve style issue
May 7, 2020
b2aaee1
[SYCL] Employ addEmptyCmd whilst creating host accessor.
May 8, 2020
bc2a4df
[SYCL] Pass less arguments to GraphBuilder::connectDepEvent
May 8, 2020
68da219
[SYCL] Fix build issue
May 8, 2020
126cc32
[SYCL] Rewrite GraphBuilder::connectDepEvent in a clearer way.
May 8, 2020
45df093
[SYCL] Fix build issue
May 8, 2020
1542f8a
[SYCL] Add comment on work of GraphBuilder::connectDepEvent.
May 8, 2020
3d8b054
[SYCL] Uplift dev version
May 8, 2020
1cdc04f
[SYCL] Fix style issue
May 8, 2020
f900e6e
[SYCL] Removed reset
May 8, 2020
76da746
Revert "[SYCL] Removed reset"
May 8, 2020
168beb2
[SYCL] Address review comments.
May 10, 2020
14b9232
[SYCL] Address review comments.
May 11, 2020
e47a093
[SYCL] Address review comments.
May 11, 2020
2c28361
Merge branch 'sycl' into private/s-kanaev/event-callback
May 11, 2020
2aab6a1
[SYCL] Employ only read-lock while enqueueing recently added command.
May 12, 2020
053a4c3
[SYCL] Fix race-condition
May 12, 2020
89bd48b
[SYCL] Remove unneeded code.
May 12, 2020
5fa2789
[SYCL] Set proper reason for blocking of empty cmd
May 8, 2020
2dc3564
[SYCL] Make ConnectCmd depend on requirement
May 8, 2020
316e983
[SYCL] Don't depend on host task command explicitly.
May 13, 2020
b93675c
[SYCL] Fix deadlock.
May 13, 2020
52456ce
[SYCL] Add another test
May 13, 2020
40659d7
Merge branch 'sycl' into private/s-kanaev/event-callback
May 13, 2020
b8f47ce
[SYCL] Fix style issues
May 13, 2020
5b0d040
[SYCL] Fix style issue
May 14, 2020
f7c890e
[SYCL] Remove FileCheck use.
May 14, 2020
0480731
[SYCL] Fix segfault caused by missed dependency
May 14, 2020
066504e
[SYCL] Fix assertion triggering. Return reference to command group in…
May 14, 2020
9e76b68
[SYCL] Update test
May 14, 2020
6e123c4
[SYCL] Fix style issue
May 14, 2020
74282e0
[SYCL] Address comments.
May 15, 2020
90f73c4
Merge branch 'sycl' into private/s-kanaev/event-callback
May 18, 2020
b4ab2f2
[SYCL] Eliminate for-loop whilst constructing deps of connect-cmd
May 18, 2020
64d6ba8
[SYCL] Reword construction of a vector
May 18, 2020
692bf79
[SYCL] Reword comments
May 18, 2020
6f3b4d7
[SYCL] Eliminate const_cast
May 18, 2020
5d2635b
[SYCL] Fix style issues
May 18, 2020
efd1495
[SYCL] Fix style issues
May 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "[SYCL] Remove unwanted changes"
This reverts commit 36dffd9.

Signed-off-by: Sergey Kanaev <[email protected]>
  • Loading branch information
Sergey Kanaev committed Apr 30, 2020
commit c309777abd8f3a33ae48eb0988113915f38b5e36
16 changes: 14 additions & 2 deletions sycl/source/detail/scheduler/graph_builder.cpp
Original file line number Diff line number Diff line change
@@ -615,6 +615,15 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
} else {
LinkedAllocaCmd->MIsActive = false;
Record->MCurContext = Queue->getContextImplPtr();

std::set<Command *> Deps =
s-kanaev marked this conversation as resolved.
Show resolved Hide resolved
findDepsForReq(Record, Req, Queue->getContextImplPtr());
for (Command *Dep : Deps) {
AllocaCmd->addDep(DepDesc{Dep, Req, LinkedAllocaCmd});
Dep->addUser(AllocaCmd);
}
updateLeaves(Deps, Record, Req->MAccessMode);
addNodeToLeaves(Record, AllocaCmd, Req->MAccessMode);
Comment on lines +612 to +619
Copy link
Contributor Author

@s-kanaev s-kanaev Apr 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need these changes here to eliminate data race on devices

}
}
}
@@ -767,7 +776,8 @@ void Scheduler::GraphBuilder::cleanupCommandsForRecord(MemObjRecord *Record) {
Visited.insert(AllocaCmd);

for (Command *UserCmd : AllocaCmd->MUsers)
ToVisit.push(UserCmd);
if (UserCmd->getType() != Command::CommandType::ALLOCA)
ToVisit.push(UserCmd);

CmdsToDelete.push_back(AllocaCmd);
// These commands will be deleted later, clear users now to avoid
@@ -784,7 +794,9 @@ void Scheduler::GraphBuilder::cleanupCommandsForRecord(MemObjRecord *Record) {
continue;

for (Command *UserCmd : Cmd->MUsers)
ToVisit.push(UserCmd);
if (UserCmd->getType() != Command::CommandType::ALLOCA) {
ToVisit.push(UserCmd);
}

// Delete all dependencies on any allocations being removed
// Track which commands should have their users updated