Hi, I'm trying to measure the power of a deep learning model at Raspberry Pi, Jetson, etc ..
And I have just three questions.
1. The description page of v 6.x contains information about Python code profiling, but it was not on the description page of v 7.x.
Did the function get deleted after moving on to version 7?
2. Is code profiling function available even if I use NIDAQ equipment instead of Energy Probe?
3. The figure on the description page showed NI USB-621x as an example, is that the only line available? If so, which device is appropriate?(e.g. USB-6211)
(Arm Streamline User Guide Version 7.5)
Jeongho Kim said:1. The description page of v 6.x contains information about Python code profiling, but it was not on the description page of v 7.x. Did the function get deleted after moving on to version 7?
Correct, it's no longer officially supported, although the instructions from 6.x would probably still work. The data Streamline used was the same as you'd get using the Python built-in profiling functionality.
Jeongho Kim said:2. Is code profiling function available even if I use NIDAQ equipment instead of Energy Probe?
Yes, native profiling is independent of the energy capture functionality.
Jeongho Kim said:3. The figure on the description page showed NI USB-621x as an example, is that the only line available? If so, which device is appropriate?(e.g. USB-6211)
That's the only version we test. Other models might work; the caiman adapter is provided as source so you can modify it if you need different behavior.
HTH,
Pete
Thank you for reply!
Could you answer a few more questions?
1. Why did the Python built-in profiling function get deleted when the version was updated? Is it because of a problem with the function?
2. In arm streamline, there is no level of CPU, GPU, etc. in the configuration setting of each channel, but can only four options of Energy, Power, Voltage and Current be selected?
Arm Streamline User Guide Version 7.5
3. If only the above four options(Energy, Power, Voltage and Current) can be selected, for example, when power is selected, does streamline show all power records at the cpu, gpu, and system level, etc?
> Why did the Python built-in profiling function get deleted when the version was updated?
It wasn't really doing anything that the built-in Python profiler couldn't do, and it had relatively high overhead.
> Does streamline show all power records at the cpu, gpu, and system level, etc?
Streamline will show whatever you decide to power instrument - we have no way to tell what the power rail you attach the probe to does.
Thanks a lot!
I am trying to load a deep learning model on Raspberry Pi, infer one data, and obtain records such as power in the meantime. The language used is Python, and I want to obtain measurement records only where the model runs(predicts) in the structure as shown below.
...
model = tf.keras.models.load_model('model')
y = model.predict(data_x) # Here is where I want to log
The size of the model can be very small, so the inference time may be about 1 ms. Then is it okay to use the python profiler function of 6.x version?
If not, how can I log that part?
Thanks
Streamline is a sample-based profiler, typically taking 1ms samples, so it won't work well with a single run of the network. You will need to run the model in a loop for 5-10 seconds to build up a statistically useful sample set.
I'd always start with the built-in profiler in Python to see how well that works docs.python.org/.../profile.html
On the page above, it is said that even smaller units than 1ms can be reported, is 1ms maximum when sampling power?
The sample rate in that dialog is for the on-device sampling. For power analysis the sample rate is defined by the probe hardware, and isn't configurable. For NI DAQ hardware using Caiman the sample rate is 10KHz.
Thank you!
1. Then is it right that the sample rate of arm probe is 1khz and the sample rate of NI DAQ is 10khz?
And according to streamline 7.0 documents(Arm Streamline Performance Analyzer User Guide Version 7.0), the maximum sampling rate in 7.0 version is 1khz, but if it does, does it get 1khz samples even if I use ni daq to sample 10khz?
2. According to this page(Arm Streamline Performance Analyzer User Guide Version 7.0), it says 'NI-DAQmx software installed on your host machine, so caiman can communicate with the NI DAQ device. This software package includes drivers for the NI DAQ device. You must use the NI-DAQmx Base software on Linux.'
Then do I have to install and use streamline and DAQmx Base in linux environment?
The default visualization will present 1ms data points, merging multiple samples. If you analyze in high resolution mode the higher detail power data will be preserved (but the normal data captured at 1ms samples will be interpolated).To use the NI DAQ with Streamline you will need to install the NI DAQ software to provide the device drivers for the hardware.