Should relay.nn operators be documented in the language reference

A simple

$> cd $tvm_checkout
$> grep -r RELAY_REGISTER_OP src/ | grep "nn\."  | grep -v qnn   | sed 's,:, ,g'   | sed 's,(, ,g' | sed 's,), ,g' | awk '{print $3;}'  | uniq | wc -l

$> cd $tvm_checkout/docs/reference/langref 
$> grep "nn\." relay_op.rst  | grep -v qnn | wc -l

Shouldn’t the remaining 65 be documented here ? Assuming grepping for RELAY_REGISTER_OP is the right way to find these operators, then should they be manually documented and if so can the committers make it a point to ensure that the documentation is kept up to date when new relay operators are added in the future.

regards Ramana

@areusch @tqchen ?

Right now it seems the convention is to document in code with .describe. I’m not sure if we generate any docs from these, but it seems like that’s the right way to go. What do you think?

Autogenerating the docs would be the best way to go and potentially something that’s a linter job to ensure that the documentation is up to date before the PR is merged.

Having an up to date document that people are able to read it from the docs without finding it from the source is something that I think should be the minimum we expect from projects.

regards Ramana

I would suggest printing the keys from the actual op registry via packed func interface (it’s just a Map):


Thanks that sounds interesting - Would it be possible for you to work on this and automate it ? It sounds like the kind of thing which would be useful to keep up to date with a sort of “linting” task ?


Yeah I or anyone can probably work on this. Probably don’t have bandwidth next week though. Seems pretty beginner friendly so maybe open up a github issue and then add “beginner-friendly” tag?

@AndrewZhaoLuo yeah can you backlink the issue here? want to track it.

Ah yeah, here is an issue I just made: