Skip to content

Conversation

@bddppq
Copy link
Contributor

@bddppq bddppq commented May 22, 2019

Stack:
    :white_circle:  #20820 Add mkldnn sigmoid operator  💚
    :white_circle:  #20800 Enable torch.jit.trace for mkldnn modules  💚
    :black_circle:  #20799 Add support for save and load mkldnn modules  💛

Pull Request resolved: #20799

Differential Revision: D15447891

Differential Revision: D15447891
Differential Version: 82663074
@pytorchbot pytorchbot added the module: mkldnn Related to Intel IDEEP or oneDNN (a.k.a. mkldnn) integration label May 22, 2019
@bddppq bddppq requested review from driazati, dzhulgakov, gchanan and wanchaol and removed request for wanchaol May 22, 2019 06:08
Copy link
Collaborator

@dzhulgakov dzhulgakov left a comment

Choose a reason for hiding this comment

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

Btw, what happens if I just try to .save() a mkldnn tensor? does it magically convert to_dense? or do we produce a nice error message?

@bddppq
Copy link
Contributor Author

bddppq commented May 22, 2019

@pytorchbot retest this please

@bddppq
Copy link
Contributor Author

bddppq commented May 22, 2019

@pytorchbot retest this please

Differential Revision: D15447891
Differential Version: 82769280
@pytorchbot pytorchbot added oncall: jit Add this issue/PR to JIT oncall triage queue module: tests Issues related to tests (not the torch.testing module) labels May 22, 2019
bddppq added 3 commits May 22, 2019 18:29
Differential Revision: D15447891
Differential Version: 82814493
Differential Revision: D15447891
Differential Version: 82826426
Differential Revision: D15447891
Differential Version: 82829033
bddppq added 2 commits May 23, 2019 01:56
Differential Revision: D15447891
Differential Version: 82845519
Differential Revision: D15447891
Differential Version: 82882392
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 63585c3.

@bddppq bddppq deleted the export-D15447891 branch May 24, 2019 03:03
class MkldnnLinear(torch.jit.ScriptModule):
def __init__(self, dense_module):
super(MkldnnLinear, self).__init__()
self.register_buffer('weight', dense_module.weight.to_mkldnn())
Copy link
Collaborator

Choose a reason for hiding this comment

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

@bddppq , I doubt that why we regist weight to a buffer not a parameter, it is not suitable to training a mkldnn module if the weight is regist as a buffer. Can you tell me when we will use the jit save path?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@bddppq , I have tried regist weight to a parameter to run backward, I found backward operation can be run, but the jit save and load have some problem, can you give me some advice? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: mkldnn Related to Intel IDEEP or oneDNN (a.k.a. mkldnn) integration module: tests Issues related to tests (not the torch.testing module) oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants