Skip to content

Conversation

EwanC
Copy link
Collaborator

@EwanC EwanC commented Feb 23, 2023

Merge record & replay implementation into PoC

Bensuo and others added 6 commits December 13, 2022 13:17
- Add entry points to queue for graph record and replay (empty impl)
- Add queue_state enum (currently unused)
- Move graph_state enum into separate header.
- Add simple record/replay test
* [SYCL] Implement basic record and replay functionality

- Basic record and replay functionality by intercepting kernel submission calls.
- Modifications to the queue impl class to facilitate this functionality.
- Nodes are currently serialised in order with no edge/dependency generation.
- Simple and dotp examples work with versions for this API.
- Improved method of determining edges for nodes recorded to a graph.
- Currently only considers pointer args.
- Copies of args are now stored inside `node_impl`
- Remove last node mechanism needed for previous simple approach.
* [SYCL] Update graph recording mechanism

- Begin and end recording now happens through the graph object.
- Begin and end functions removed from queue class.
- Graph impl now keeps track of which queues are currently recording to it.
- Update graph submissions in record and replay examples to use ext_oneapi_graph.
- Adds unit tests for begin and end recording on the graph object.
@EwanC EwanC added the Graph Implementation Related to DPC++ implementation and testing label Feb 23, 2023
@EwanC EwanC requested a review from Bensuo February 23, 2023 09:18
@EwanC EwanC merged commit d4c1ed3 into sycl-graph-poc-v2 Feb 27, 2023
@Bensuo Bensuo deleted the sycl-graph-record-replay branch August 7, 2023 16:31
mfrancepillois pushed a commit that referenced this pull request Oct 2, 2023
…… (#67069)

We noticed some performance issue while in lldb-vscode for grabing the
name of the SBValue. Profiling shows SBValue::GetName() can cause
synthetic children provider of shared/unique_ptr to deference underlying
object and complete it type.

This patch lazily moves the dereference from synthetic child provider's
Update() method to GetChildAtIndex() so that SBValue::GetName() won't
trigger the slow code path.

Here is the culprit slow code path:
```
...
frame #59: 0x00007ff4102e0660 liblldb.so.15`SymbolFileDWARF::CompleteType(this=<unavailable>, compiler_type=0x00007ffdd9829450) at SymbolFileDWARF.cpp:1567:25 [opt]
...
frame #67: 0x00007ff40fdf9bd4 liblldb.so.15`lldb_private::ValueObject::Dereference(this=0x0000022bb5dfe980, error=0x00007ffdd9829970) at ValueObject.cpp:2672:41 [opt]
frame #68: 0x00007ff41011bb0a liblldb.so.15`(anonymous namespace)::LibStdcppSharedPtrSyntheticFrontEnd::Update(this=0x000002298fb94380) at LibStdcpp.cpp:403:40 [opt]
frame #69: 0x00007ff41011af9a liblldb.so.15`lldb_private::formatters::LibStdcppSharedPtrSyntheticFrontEndCreator(lldb_private::CXXSyntheticChildren*, std::shared_ptr<lldb_private::ValueObject>) [inlined] (anonymous namespace)::LibStdcppSharedPtrSyntheticFrontEnd::LibStdcppSharedPtrSyntheticFrontEnd(this=0x000002298fb94380, valobj_sp=<unavailable>) at LibStdcpp.cpp:371:5 [opt]
...
frame #78: 0x00007ff40fdf6e42 liblldb.so.15`lldb_private::ValueObject::CalculateSyntheticValue(this=0x000002296c66a500) at ValueObject.cpp:1836:27 [opt]
frame #79: 0x00007ff40fdf1939 liblldb.so.15`lldb_private::ValueObject::GetSyntheticValue(this=<unavailable>) at ValueObject.cpp:1867:3 [opt]
frame #80: 0x00007ff40fc89008 liblldb.so.15`ValueImpl::GetSP(this=0x0000022c71b90de0, stop_locker=0x00007ffdd9829d00, lock=0x00007ffdd9829d08, error=0x00007ffdd9829d18) at SBValue.cpp:141:46 [opt]
frame #81: 0x00007ff40fc7d82a liblldb.so.15`lldb::SBValue::GetSP(ValueLocker&) const [inlined] ValueLocker::GetLockedSP(this=0x00007ffdd9829d00, in_value=<unavailable>) at SBValue.cpp:208:21 [opt]
frame #82: 0x00007ff40fc7d817 liblldb.so.15`lldb::SBValue::GetSP(this=0x00007ffdd9829d90, locker=0x00007ffdd9829d00) const at SBValue.cpp:1047:17 [opt]
frame #83: 0x00007ff40fc7da6f liblldb.so.15`lldb::SBValue::GetName(this=0x00007ffdd9829d90) at SBValue.cpp:294:32 [opt]
...
```

Differential Revision: https://reviews.llvm.org/D159542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Graph Implementation Related to DPC++ implementation and testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants