Check that NaiveEngine is used


#1

Hello,

I have some code which runs fine with NaiveEngine, but breaks with the threaded engines.

I’d like to put some assert in my code to check that NaiveEngine is used. Thinking about

assert(os.environ[“MXNET_ENGINE_TYPE”] == ‘NaiveEngine’)

Just wondering whether this is the right way to do it, or whether there is a better way?

Thanks,


#2

What you’re doing is the only way I know of. NaiveEngine is very slow and only meant for debugging issues. If you need help resolving the issue with multi-threaded engine in your use case, feel free to post your questions.