Skip to content

morapi_DnnOptimizer Struct Reference

dnn » prof

Dnn optimizer.
More...

#include <morapi_softneuro.h>

Public Member Functions

morapi_DnnOptimizer morapi_create_DnnOptimizer (morapi_Env *io_env)
morapi_Result  morapi_destroy_DnnOptimizer (morapi_Env *io_env, morapi_DnnOptimizer *self)
morapi_Result  morapi_DnnOptimizer_init (morapi_DnnOptimizer *self, morapi_DnnProf *i_prof)
morapi_Result  morapi_DnnOptimizer_cleanup (morapi_DnnOptimizer *self)
const morapi_DnnPlan morapi_DnnOptimizer_getPlan (const morapi_DnnOptimizer *self)
morapi_DnnProf morapi_DnnOptimizer_getProf (const morapi_DnnOptimizer *self)
morapi_Result  morapi_DnnOptimizer_optimize (morapi_DnnOptimizer *self)


Detailed Description

Dnn optimizer.

This structure searches for the optimal routines and parameters from the profiling data.


test_prof_api.c.


Member Function Documentation


morapi_create_DnnOptimizer()

morapi_DnnOptimizer * morapi_create_DnnOptimizer (morapi_Env * io_env)

Creates an optimizer.


test_prof_api.c.


morapi_destroy_DnnOptimizer()

morapi_Result morapi_destroy_DnnOptimizer (morapi_Env * io_env,
                                           morapi_DnnOptimizer * self)

Destroys the optimizer.


test_prof_api.c.


morapi_DnnOptimizer_init()

morapi_Result morapi_DnnOptimizer_init (morapi_DnnOptimizer * self,
                                        morapi_DnnProf * i_prof)

Initializes the optimizer with an profiler.

Parameters

  • self : the dnn optimizer
  • i_prof : the profiler used for optimization

test_prof_api.c.


morapi_DnnOptimizer_cleanup()

morapi_Result morapi_DnnOptimizer_cleanup (morapi_DnnOptimizer * self)

Cleans up the optimizer.

Parameters

  • self : the optimizer


morapi_DnnOptimizer_getPlan()

const morapi_DnnPlan * morapi_DnnOptimizer_getPlan (const morapi_DnnOptimizer * self)

Gets the optimized plan.

Execute this function after morapi_DnnOptimizer_optimize().

Parameters

  • self : the dnn optimizer

Returns

the optimized plan


test_prof_api.c.


morapi_DnnOptimizer_getProf()

morapi_DnnProf * morapi_DnnOptimizer_getProf (const morapi_DnnOptimizer * self)

Gets the profiler for the optimizer.

Parameters

  • self : the dnn optimizer

Returns

the dnn profiler


morapi_DnnOptimizer_optimize()

morapi_Result morapi_DnnOptimizer_optimize (morapi_DnnOptimizer * self)

Runs the optimizer.

After calling this, execute morapi_DnnOptimzer_getPlan() to get morapi_DnnPlan object.

Parameters

  • self : the dnn optimizer

test_prof_api.c.