σ šΔοYc@@sfdZddlmZddlZddlmZmZmZddd„Zd d „Z d „Z dS( sProfiler setting methods.i(tabsolute_importNi(t_LIBt check_calltc_strtsymbolics profile.jsoncC@sAidd6dd6}ttjtj||ƒt|ƒƒƒdS(s3Set up the configure of profiler. Parameters ---------- mode : string, optional Indicates whether to enable the profiler, can be 'symbolic', or 'all'. Defaults to `symbolic`. filename : string, optional The name of output trace file. Defaults to 'profile.json'. iRitallN(RRtMXSetProfilerConfigtctypestc_intR(tmodetfilenametmode2int((s.build/bdist.linux-armv7l/egg/mxnet/profiler.pytprofiler_set_configs  tstopcC@s8idd6dd6}ttjtj||ƒƒƒdS(sΠSet up the profiler state to record operator. Parameters ---------- state : string, optional Indicates whether to run the profiler, can be 'stop' or 'run'. Default is `stop`. iR itrunN(RRtMXSetProfilerStateRR(tstatet state2int((s.build/bdist.linux-armv7l/egg/mxnet/profiler.pytprofiler_set_state+s cC@sttjƒƒdS(srDump profile and stop profiler. Use this to save profile in advance in case your program cannot exit normally.N(RRt MXDumpProfile(((s.build/bdist.linux-armv7l/egg/mxnet/profiler.pyt dump_profile7s( t__doc__t __future__RRtbaseRRRR RR(((s.build/bdist.linux-armv7l/egg/mxnet/profiler.pyts