Skip to content

Conversation

@wanchaol
Copy link
Collaborator

@wanchaol wanchaol commented Aug 10, 2018

The PR is the first step to integrate torch.nn library with JIT. It adds the tests for nn functional interfaces in trace/script mode, and tries to find out the different between torch.nn.functional ops and the ATen ops, to see the work need to be done in order to support a full set of nn functional in script mode.

Some statistics in summary:

  • Totally 84 useful functions in torch.nn.functional (the number does not include helper funcs and deprecated funcs in torch.nn.functional).

  • 7 functions/ops does not support higher gradient, so just excluded from the whole test.

  • 36 functions is different with the Aten op for different reasons. Among those 36 functions, bunch of them (roughly around 10-15) are just naming difference and simple transformation using other ops inside the function.

@wanchaol wanchaol requested review from jamesr66a and zdevito August 10, 2018 17:43
@wanchaol wanchaol added oncall: jit Add this issue/PR to JIT oncall triage queue 0.3 and removed 0.3 labels Aug 10, 2018
test/test_jit.py Outdated

This comment was marked as off-topic.

@ezyang
Copy link
Contributor

ezyang commented Aug 15, 2018

Is this still WIP?

@wanchaol wanchaol changed the title [WIP] Add nn functional tests in JIT Add nn functional tests in JIT Aug 15, 2018
@wanchaol
Copy link
Collaborator Author

@ezyang the PR is ready for review, please take a took if you have some time.

test/test_jit.py Outdated
def fn(*inputs, **kwargs):
output = getattr(inputs[0], name)(*inputs[1:], **kwargs)
return output_process_fn(output)
if test_type == 'nn_op':

This comment was marked as off-topic.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wanchaol has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

@ezyang ezyang added the merged label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants