Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.

How do I get NCS/NCS2 temperature?

Dal_Ben__Mattia
Beginner
2,348 Views

Hi,

how can I get the temperature of the Neural Compute Stick while it's running? I know I could use the Python API with the NCSDK to this end but I can't find anything about the temperature with OpenVINO.

Thanks.

0 Kudos
16 Replies
Dal_Ben__Mattia
Beginner
2,348 Views

Any update on this? I'm particularly interested in detecting the thermal throttling levels during heavy use of the device.

0 Kudos
JesusE_Intel
Moderator
2,348 Views

Hi Mattia,

This is currently not possible with OpenVINO Toolkit. However, could you provide additional details about your use case scenario? I will provide your feedback to the engineering team for consideration. 

Regards,

Jesus

0 Kudos
pmundt
Beginner
2,029 Views

Hi JesusE,

We're experimenting with the NCS2 in an enclosed Edge gateway that is passively cooled, and which also has to share the ambient environment with a number of other accelerators. We rely on thermal monitoring of the different accelerators to determine what can be deployed where, and can use this information with AlertManager to take some corrective actions at various thermal trip points (e.g. descheduling a service / falling back on the Cloud backend, or triggering a redeployment of the Edge-based inference microservice onto a different accelerator).

I would ideally like to be able to expose the NCS2 thermal data through a prometheus exporter directly such that it's possible to tie this in with the rest of our monitoring stack. I will probably work around this limitation in the interim by just exposing an exporter class I can instantiate in each inference microservice that's using the NCS2, but would obviously prefer to be able to do this from a single exporter without needing to separately instrument each microservice.

Loading a dummy model onto the device and not actually running any inference workloads might also work as a workaround, but this is also far from ideal.

0 Kudos
pmundt
Beginner
2,013 Views

For anyone that's interested, I came up with a working prometheus exporter where we simply separate between the main metrics and push the temperature collection down to the inference application that's responsible for loading a network. This works fine for monitoring the temperature of the USB-attached NCS2.

If the OpenVINO runtime is ever updated to expose DEVICE_THERMAL directly, the device instantiation can be taken care of by the main exporter.

0 Kudos
Dal_Ben__Mattia
Beginner
2,348 Views

Hi Jesus,

We are interested in assessing the performance of the device under load when integrated in our systems. Our systems will integrate a mPCI-e Myriad X and we need to know exactly when the device triggers the thermal throttling to evaluate custom dissipation solutions. In other words, we need to understand the thermal range we can guarantee for our system.

Regards,

Matt 

0 Kudos
Farhan__Erez
Beginner
2,348 Views

Hi,

Topping Matt's request here.

Having the temperature API as existed in the NCS SDK is crucial for us, and is a basic backward compatibility IMO.

This is very disappointing. Any chance it will change soon?

Regards,

Erez.

0 Kudos
EdBordin
Beginner
2,348 Views

I agree with everyone else here - in the absence of proper thermal specs for the NCS 2 hardware, it is vital that we can monitor the temperature and diagnose when throttling occurs. After all, this hardware is supposed to be deployed "at the edge" which often means harsher environments! 

0 Kudos
Tenn__Hian-Kun
Beginner
2,348 Views

Several months have passed.

Now we have OpenVINO R2, but do we already have straight approach to get the temperature of NCS 2?

BR,

Hiankun

0 Kudos
L__J
Beginner
2,348 Views

Hi, is this possible now? Since it seems quite easy to use the NCS2 and get it running hot enough that it throttles thermally it would be very handy to extract the temperature and throttling status information as it was in the NCSDK.

 

Thanks, especially if it becomes possible

 

Jesus E. (Intel) wrote:

Hi Mattia,

This is currently not possible with OpenVINO Toolkit. However, could you provide additional details about your use case scenario? I will provide your feedback to the engineering team for consideration. 

Regards,

Jesus

0 Kudos
JesusE_Intel
Moderator
2,348 Views

Hi L, J,

Could you try reading the current temperature of the MYRIAD device with the following snip of code found in the Inference Engine Query API documentation?

InferenceEngine::Core core;
auto exeNetwork = core.LoadNetwork(network, "MYRIAD");
float temperature = exeNetwork.GetMetric(METRIC_KEY(DEVICE_THERMAL)).as<float>();

Regards,

Jesus

0 Kudos
JRt00
Beginner
2,348 Views

Hi Jesus,

This is not a python code. Is there an equivalent in python?

Thanks

0 Kudos
JesusE_Intel
Moderator
2,348 Views

Hi JN,

You can use the get_metrics function under the Python API for the Inference Engine.

ie = IECore()
ie.get_metric(metric_name="DEVICE_THERMAL", device_name="MYRIAD")

Regards,

Jesus

0 Kudos
BuuVo
New Contributor I
2,090 Views

Hi,
I used your code to check the NCS2 temperature. But I got this error:

TypeError: Failed to convert parameter to Python representation!

How can I fix this problem?

Thank you!

0 Kudos
pmundt
Beginner
2,031 Views

I was struggling with this error for awhile as well, and finally worked out that whatever is handing the DEVICE_THERMAL value back to get_metric() is throwing a TypeError. You can add an except on TypeError if you'd prefer python to not just randomly die when the temperature is unreadable (this should really be documented in the python API, as it's rather non-intuitive).

Even with this in place, however, you won't get a reading. You must load a network (doesn't matter which, I picked the smallest I could find) onto the device before the metric is exposed. I can verify that I'm able to query the device temperature of an NCS2 usb stick using both the C++ and python APIs once a network has been loaded.

 

 

0 Kudos
Knoche__Martin
Beginner
2,348 Views

Kia ora Jesus,

we use NCS2 on Raspberry Pi 4, 4GB for object detection & tracking. It works well. However, the NCS2 overheats pretty fast and then stops with inference errors (see error message attached). I also like to monitor the temperature of the NCS2 and then shut down NCS for cool down and restart. What Python library like IECORE do I need to load to get the below code to work?

Many thanks and greetings from Aotearoa (the land of the long white cloud, New Zealand),

Martin

 

here my Python code snippet...

   delta is interval when to check for NCS2 temperature

   time1 = datetime.now()
    
    if  time1 > (stime + delta):
        
        # check NCS temperature
        # find and open NCS
        """

        # for NCS 1
        device_list = mvncapi.enumerate_devices()
        device = mvncapi.Device(device_list[0])
        device.open()
        thermal_stats = device.get_option(mvnc_DeviceOption.RO_THERMAL_STATS)
        
        """
        # get NCS temperature
        ie = IECore()
        thermal_stats = ie.get_metric(metric_name='DEVICE_THERMAL',device_name='MYRIAD')
        print('NCS device temp: ', thermal_stats,' at ', stime)
        
        if thermal_stats > 75:
            print('NCS device temp > 75C - shut down VC program ', thermal_stats)
            break
        """
        # NCS clean up
        device.close()
        device.destroy()
        """
 

0 Kudos
pruder_chose
Beginner
2,348 Views

Hello.

I want to buy 4 x ncs2 to upgrade Odroid c4. 
because of massive body of each stick i have to tear them down and make my own cooling. 
 

Before I start I want to know what is necessary and what is the best idea to avoid while creating my own cooler? Main idea is to create cluster of Odroid c4 (48pcs) each with 4 sticks. 
 

I am open to any advice.

0 Kudos
Reply