Skip to content

Conversation

@tkonolige
Copy link
Contributor

Allow for profiling over RPC by serializing the returned report beforesending it. Also remove collectors argument when profiling over rpc because it cannot be serialized.

@jwfromm @leandron

Tristan Konolige added 3 commits August 30, 2021 15:46
Allow for profiling over RPC by serializing the returned report before
sending it. Also remove collectors argument when profiling over rpc
because it cannot be serialized.
@tkonolige tkonolige force-pushed the fix_remote_profiler branch from 432f044 to ba49bb4 Compare August 30, 2021 22:46
Copy link
Contributor

@jwfromm jwfromm left a comment

Choose a reason for hiding this comment

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

Some minor nitpicks but otherwise LGTM.

self.module = _ffi_api._VirtualMachineDebug(exe.module)

# Make sure the constructor of the VM module is on the proper device
if device.device_type >= rpc_base.RPC_SESS_MASK:
Copy link
Contributor

Choose a reason for hiding this comment

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

Checking device type using a >= is kind of confusing. If there isn't a better way to check can you explain why the >= works in a comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

while (reader.NextArrayItem()) {
calls.push_back(parse_metrics(&reader));
}
// reader.EndArray();
Copy link
Contributor

Choose a reason for hiding this comment

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

should these commented out lines be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like leaving these lines in as it makes it clear where the end of each Array/Object is.

@masahi masahi merged commit c650f9a into apache:main Sep 9, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
* [PROFILING] Profiling over RPC

Allow for profiling over RPC by serializing the returned report before
sending it. Also remove collectors argument when profiling over rpc
because it cannot be serialized.

* lint

* fixes

* add comments
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [PROFILING] Profiling over RPC

Allow for profiling over RPC by serializing the returned report before
sending it. Also remove collectors argument when profiling over rpc
because it cannot be serialized.

* lint

* fixes

* add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants