Closed rscohn2 closed 8 months ago
"--chrome-kernel-logging" does not enable Itt logging. As of now Unitrace does not have any option for user to enable only Itt logging. Unitrace traces itt calls as part of oneCCL, oneDNN and MPI.
There is a workaround you can try by setting environment variable "UNITRACE_ChromeIttLogging=1" as part of your launch script. Let me know if you still don't see Itt events.
Setting the environment variable enables the itt logging, but I still don't see my events in the json file. I tried to trace it through but the wrappers for the itt_task_begin makes it hard to understand what should happen. I am making itt_task_begin calls directly from my application and linking with the libittnotify.a that is built by pti-gpu.
I will try to recreate the issue at my end and analyze it further. In case you any small sample which I can use to reproduce the issue let me know.
Here is an example:
#include <ittnotify.h>
int main(int argc, char *argv[]) {
__itt_domain *domain = __itt_domain_create("DR");
__itt_string_handle *handle = __itt_string_handle_create("DR_Init");
__itt_task_begin(domain, __itt_null, __itt_null, handle);
__itt_task_end(domain);
return 0;
}
Build:
icpx test.cpp -I ~/software/install/include ~/software/install/lib/libittnotify.a -o unitrace-test
Run:
idc-beta-batch-pvc-node-02:unitrace$ rm -f *.json && UNITRACE_ChromeIttLogging=1 unitrace ./unitrace-test && cat *.json
Checking
itt enabled
itt created
Enabling chrome for itt
Destructor
[INFO] Timeline is stored in unitrace-test.3602166.json
{ "traceEvents":[
{"ph": "M", "name": "process_name", "pid": 3602166, "ts": 1704295094529532, "args": {"name": "HOST<idc-beta-batch-pvc-node-02>"}}
]
}
idc-beta-batch-pvc-node-02:unitrace$
@rscohn2, We have added "--chrome-itt-logging" as option. If you are happy with the change then please close the ticket.
Thanks
I want to add my own application events in unitrace. I added itt directly to my application and link against the static library.
My test program does:
The program runs, but I do not see my DR events in the json file:
Is there something more I have to do?