Skip to content

DSL profiling#469

Merged
bosilca merged 11 commits intoICLDisco:masterfrom
therault:dsl-profiling
Jan 27, 2023
Merged

DSL profiling#469
bosilca merged 11 commits intoICLDisco:masterfrom
therault:dsl-profiling

Conversation

@therault
Copy link
Copy Markdown
Contributor

@therault therault commented Jan 5, 2023

This PR allows the DSL to define its own task structure information. For TTG and for DTD, the additional parameters are not necessarily consecutive inside the locals, and/or not necessarily in a single block of memory (for TTG in particular). The proposed solution consists in exposing the logging buffer to a callback, and the DSL-specific callback writes what needs to be written inside the buffer, instead of requiring it to put all the data in a contiguous temporary memory that is then copied into the log buffer.

This is the second PR that is required to get all features of TTG ported on top of PaRSEC master. Please have a look / review.

@therault therault requested a review from a team as a code owner January 5, 2023 00:55
Comment thread tests/dsl/ptg/strange.jdf Outdated
parsec = parsec_init(-1, &pargc, &pargv);
assert( NULL != parsec );

#if defined(PARSEC_PROF_TRACE)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why are we explicitly calling parsec_profiling_start in user-land ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That was a bug, fixed in 2cd3eec

Comment thread parsec/parsec.c
Comment thread parsec/profiling.c Outdated
Comment thread parsec/interfaces/dtd/insert_function.c
a buffer size limit, the code would wrongly terminate
…a a user-defined function; extend the parsec task class to take a DSL-defined function to log the beginning and end of a task; use this DSL-defined function in the task profiling macro
the event should also trace the additional info;

In PINS task_profiler, only trace additional info once per task
(after the completion of the task, so we get potential updates
of the state of the task);
@omor1
Copy link
Copy Markdown
Contributor

omor1 commented Jan 26, 2023

From #428:

Does this PR let users have task classes inject extra profiling info into each task?

Yes, this is the goal of this PR, and yes it allows to avoid cluttering the locals with information you want to display. But the target is more towards DSLs than users (although, if users want to write their own profile_info function and overwrite the DSL's, I don't see why not)

Ideally, PTG would implement this for recursive tasks, so the user doesn't need to write it each time.

@bosilca bosilca merged commit 8ba74c1 into ICLDisco:master Jan 27, 2023
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