Exception: 'The parameter is incorrect.' When attempting to run an ONNX model with convolution - windows-machine-learning

I am seeing an exception from the WinML runtime 'The parameter is incorrect.' when running a single convolution ONNX model on DirectX devices.
My model runs fine on Default and Cpu devices, and I am able to run the SqueezeNet.onnx model from the Windows Machine Learning repository fine on DirectX devices. My model uses the same operator set id, convolution attributes, weights, and bias as the first SqueezeNet convolution as well. I have also ran the ONNX python library's checker on my model and it appears OK from that tool's perspective.
Is there a way to get more information on what went wrong inside the runtime? Will the API provide more information in the future, or offer a validation function?

You can collect Windows Machine Learning Trace messages using Logman for more informational debugging. Refer to here to see how to use Logman: https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/logman
Here is an example usage of logman on Command Prompt using our GUID:
logman start winml -ets -o winmllog.etl -nb 128 640 -bs 128
logman update trace winml -p {BCAD6AEE-C08D-4F66-828C-4C43461A033D}
0x0 0x0 -ets
Run your scenario or application
logman stop winml -ets
you can then view the produced ETL file with a viewer like Windows Performance Analyzer

Another way you can also get detailed error messages is by simply running it under the debugger.
When Windows AI hits into issues at runtime, it uses RoOriginateError with an informative string. You will be able to see that error string right in the debugger.

Related

WMI Query extremely slow

I'm trying to run a query that gets the windows service name corresponding to a process ID:
SELECT * FROM Win32_Service where ProcessId = {myID}
This query is expected to run for valid or invalid process IDs as my component may run on a windows service, or as part of the main application or even tests.
When I use run > wbemtest and test this query with a non existing pid it usually comes back instantly, but there's one machine where this takes 2 minutes.
I don't understand why this runs so much slower on that machine particularly, is there a way to diagnose what's causing this? How can it be fixed?
For investigating WMI issues, there are different places in the event viewer:
Windows Logs, Application and System
Application and Services Logs
Microsoft
Windows
WMI-Activity (in the View menu, you might need to switch on "Show Analytic and Debug logs)
A lot is described in this URL.

how to set 1 minute timer in beaglebone using DMtimer?

I want to use DMtimer of beaglebone to set timer of 1 minute.Can anybody guide me with the procedure for the same?I have worked with Pic micro controller and it's timers so I know the working of timer,but in terms of programming and register handling in the beaglebone it seems to be work in different manner.can anybody please guide me through this?
following are the details of my beaglebone green
uname -r
4.14.71-ti-r80
cat /etc/dogtag
BeagleBoard.org Debian Image 2018-10-07
cat /etc/debian_version
9.5
trying to write c code in linux ubuntu
The following answer assumes that you are trying to create a user space program (as opposed to kernel space code such as a typical driver).
On a full OS such as Linux you don't manipulate registers to program a timer. You rather make use of kernel APIs.
Depending on the structure of your program there are a number of options.
If you have an event loop (via poll or select) you might want to use the timerfd API. See http://man7.org/linux/man-pages/man2/timerfd_create.2.html.
If you want an asynchronous notification via a signal you can use setitimer. See: http://man7.org/linux/man-pages/man2/setitimer.2.html
In general I would try to avoid signals due to their asynchronous nature.

Which local machine components could affect a RDP-session performance-wise?

I've got the following totally reproducible scenario, which I'm unable to understand:
There is a very simple application, which does nothing else than calling CreateObject("Word.Application"), that is creating an instance of MS Word for COM interop. This application is located on a Windows Terminal Server. The test case is to connect via RDP, execute the application and the application will output the time taken for the CreateObject call.
The problem now is that the execution time is significantly longer, if I connect from a specific notebook (HP Spectre): It takes 1,7s (+/- 0.1s).
If I connect from any other machine (notebook or desktop computer), then the execution time is between 0,2-0,4s.
The execution times don't depend on the used RDP account, or screen resolution, or local printers. I even did a fresh install of Windows on that HP notebook to rule out any other side-effects. It doesn't matter if the HP notebook is connected via WLAN or an USB network card. I'm at a loss understanding the 4x to 8x execution time difference to any other machine.
Which reason (component/setting) could explain this big difference in execution time?
Some additional information: I tried debugging the process using an API monitor and could see that >90% of the execution time is actually being spent between a call to RpcSend and RpcReceive. Unfortunately I can't make sense of this information.
It could be the credential management somehow being in the way.
Open the .rdp file with notepad and add
enablecredsspsupport:i:0
This setting determines whether RDP will use the Credential Security Support Provider (CredSSP) for authentication if it is available
Related documentation
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ff393716%28v%3dws.10%29
According to your information about RpcSend and RpcReceive time consumption, it could be the case you have some service stopped on your client machine, like DCOM server or some other COM-related (they usually have "COM" or "transaction" in their names).
Some of that services could be started/stopped (if Manually mode selected) by system to/after transfer your request, but there is a time delay to starting service.
I suggest you to open Computer Management - Services or run -> services.msc and compare COM-related services running on your "slow" client and on your "fast" clients, and try to set Automatically running instead Manually or Disabled.
Also, try to run API Monitor on such processes to determine the time-consuming place more precisely.

How to ensure bootloader is started

I am working with openmote-cc2538 for the project: https://github.com/cetic/6lbr/wiki
Here when I was trying to flash openmote with this command
sudo make TARGET=cc2538dk BOARD=openmote-CC2538 bootload0/dev/ttyUSB0 slip-radio.upload
This error message is displayed
ERROR:Cant CONNECT TO TARGET:Ensure bootloader is started(no answer on sync sequence)
cc2538 bsl.py script is available for uploading binary to openmote. But I don't have much experience about this. Can anybody give me some suggestions regarding how to proceed??
Grab a scope and probe different digital I/O pins on the CC2538. Typically a bootloader will initialize all the ports on the chip and you will see them change state, which is an indication that the bootloader is indeed running. I would guess one of the LEDs would change state as well (which doesn't require a scope).

CreateDC() fails with lasterror 2

I have implemented a class that gets local printers and, depending on the application option, uses one of the local printer available.
Firstly, the class enumerates the printers (EnumPrinters - PRINTER_ENUM_LOCAL) and saves the corresponding PRINTER_INFO_2. Then, it gets printer capabilities (DeviceCapabilites) and DEVMODE. Each class instance will access one printer.
When application selects the printing option, it selects which printer will be used and its corresponding instance of the class. Then, this instance creates the device context:
m_hdc = CreateDC (m_pi2->pDriverName, m_pi2->pPrinterName, NULL, m_pdm));
where
HDC m_hdc;
PRINTER_INFO_2 * m_pi2;
DEVMODE * m_pdm;
and process all printing data accordingly.
The problem is that sometimes, the CreateDC return NULL and GetLastError() return ERROR_FILE_NOT_FOUND(2).
I mean 'sometimes' because in other machines, with same printer, same processor, same Windows XP SP3 image and same test data, the CreateDC processes correctly. In addition, the reinstalling the system and application the problem disappears sometimes no.
I am looking forward to hearing any suggestion that helps me to find out the issue.
Thank you in advance.
It sounds like a problem loading a file required by the printer driver. You could use Process Monitor (a free SysInternals tool downloadable from microsoft.com) to get a bunch of information about what's going on at the time of the error. I'd do a capture and look at failed file and registry accesses. The fact that it fails intermittently on one particular machine seems consistent with a messed up driver configuration.
Another thing you could try is to create an information context rather than a device context. You can't print with an IC, but you can query information about the device, which may be a way to get additional information.

Resources