wkcn / MobulaOP

A Simple & Flexible Cross Framework Operators Toolkit
MIT License
164 stars 21 forks source link

where to find these keywords of mxnet #7

Closed z01nl1o02 closed 6 years ago

z01nl1o02 commented 6 years ago

hi i am learning from your project and want to where to find these keywords of mxnet?

like those in check_backend(b): func_names = ['get_pointer', 'dev_id', 'wait_to_read', 'wait_to_write', 'OpGen'] is there any pages online about meanings of these keywords?

wkcn commented 6 years ago

I'm sorry that I haven't written the document of MobulaOP yet.

['get_pointer', 'dev_id', 'wait_to_read', 'wait_to_write', 'OpGen'] are the variables of MobulaOP.

get_pointer(v):
    v: ndarray
    return the raw data pointer of the ndarray `v`

dev_id(a):
    a: ndarray
    return the device id of the ndarray 'a'
    if the ndarray `a` is a CPU context, return None
    if the ndarray `a` is a GPU context, return the id of GPU

wait_to_read(variables):
  variables: the list of variables
  the function will be executed before variables are read.

wait_to_write(variables):
  variables: the list of variables
  the function will be executed before variables are written.

OpGen: Define a MobulaOP template
z01nl1o02 commented 6 years ago

thanks a lot and i will try more!

wkcn commented 6 years ago

@z01nl1o02 Thank you for your support! Feel free to re-open if there are similar issues. :-)