cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sejin
Visitor
Visitor
395 Views
Registered: ‎02-24-2021

Vitis data transfer profiling does not work with --profile_kernel

Jump to solution

Hello I am using vitis on commandline.

I did use --profile_kernel option in my Makefile and did set profile=true in xrt.ini

Below is part of my Makefile

 

# =========================================================
# Kernel Compiler and Linker Flags
# =========================================================
VPPFLAGS := -t $(TARGET)
VPPFLAGS += --config design.cfg
VPPFLAGS += -I$(KERNEL_SRC_H_DIR)
VPPFLAGS += --temp_dir $(BUILD_DIR)
VPPFLAGS += --log_dir $(BUILD_DIR)
VPPFLAGS += --platform $(PLATFORM)
LDCLFLAGS = --profile_kernel data:all:all:all

# =========================================================
# Kernel XO and Xclbin File Generation
# =========================================================
$(BUILD_DIR)/$(XO_NAME).xo: $(KERNEL_SRC_CPP) $(KERNEL_SRC_H)
mkdir -p $(BUILD_DIR)
v++ $(VPPFLAGS) -c -k K_VADD $(KERNEL_SRC_CPP) -o $@

$(BUILD_DIR)/$(XCLBIN): $(BUILD_DIR)/$(XO_NAME).xo
mkdir -p $(BUILD_DIR)
v++ $(VPPFLAGS) -l $(LDCLFLAGS) -o $@ $(BUILD_DIR)/$(XO_NAME).xo

 

Below is my xrt.ini 

 

[Debug]
profile=true
timeline_trace=true
data_transfer_trace=coarse

 

I think I set everything properly to profile data transfer but when I try to see the profile summary of kernel data transfers with vitis analyzer, it gives me the message that there's no data and I should use v++ -l --profile_kernel data:all:all:all to profile but that's what I exactly did.

Any ideas on why I'm failing this? By the way I'm using vitis 2020.1

0 Kudos
1 Solution

Accepted Solutions
sejin
Visitor
Visitor
183 Views
Registered: ‎02-24-2021

Hello I finally solved it.

I'm not sure if this is the reason why it didn't work before but I looked at my kernel code and found out that it wasn't doing any valuable computation. It was supposed to go through the multi-layer for loops but the range was incorrect and I found out the computation that was supposed to happen in the very inner loop did not happen.

I fixed the code and checked the correctness of the code and now I am getting the profiled results correctly.

Anyways,  thank you all for replying.

View solution in original post

0 Kudos
5 Replies
kmorris
Xilinx Employee
Xilinx Employee
360 Views
Registered: ‎01-11-2011

Hi @sejin, could you try adding '-g' to your LDCLFLAGS? You can refer to the documentation on this below, but one of the tips given is to use this switch when trying to run sw or hw emulation with profiling.

https://www.xilinx.com/html_docs/xilinx2020_1/vitis_doc/profilingapplication.html#xmv1511400547463

-------------------------------------------------------------------------
Please don’t forget to reply, kudo, and accept as solution!
-------------------------------------------------------------------------
sejin
Visitor
Visitor
309 Views
Registered: ‎02-24-2021

Thanks. Actually I was working on the hw so I did add '-g' but things didn't change.

I wonder why this isn't working.

Actually it did work before but now it doesn't.

Before, I used the default design.cfg file. Now I'm using plrams for small data transfers so I added sp in the connectivity section of the design.cfg file.

That's basically all that have been changed but now I am not getting the kernel data transfer profiling result.

Does using PLRAMs have anything to do with this situtation?

By the way I'm getting the warning as below.

[XRT] WARNING: Trace FIFO is full because of too many events. Timeline trace could be incomplete. Please use 'coarse' option for data transfer trace or turn off Stall profiling

I did get the warning even when I get the profiling results for the kernel data transfer trace so I think this probably would not have something to do with this situation either.

Could anyone please give me any idea on how to solve this? 

0 Kudos
randyh
Xilinx Employee
Xilinx Employee
269 Views
Registered: ‎01-04-2013

test

0 Kudos
randyh
Xilinx Employee
Xilinx Employee
269 Views
Registered: ‎01-04-2013

Hi, 

You can review this section of the documentation: https://www.xilinx.com/html_docs/xilinx2020_2/vitis_doc/profilingapplication.html#vfc1586356138757

"If you are collecting a large amount of trace data, you can increase the amount of available memory for capturing data by specifying the --trace_memory option during v++ linking, and add the trace_buffer_size keyword in the xrt.ini.

--trace_memory : Indicates what type of memory to use for capturing trace data, as described in Vitis Compiler General Options.

trace_buffer_size : Specifies the amount of memory to use for capturing the trace data during the application runtime.

Finally, you can enable continuous trace capture to continuously offload device trace data while the application is running, so in the event of a application or system crash, some trace data is available to help debug the application. To enable, add the continuous_trace keyword in the xrt.ini file."

Maybe some of this will help. 

 

sejin
Visitor
Visitor
184 Views
Registered: ‎02-24-2021

Hello I finally solved it.

I'm not sure if this is the reason why it didn't work before but I looked at my kernel code and found out that it wasn't doing any valuable computation. It was supposed to go through the multi-layer for loops but the range was incorrect and I found out the computation that was supposed to happen in the very inner loop did not happen.

I fixed the code and checked the correctness of the code and now I am getting the profiled results correctly.

Anyways,  thank you all for replying.

View solution in original post

0 Kudos