Skip to content

Conversation

@smessmer
Copy link
Contributor

@smessmer smessmer commented Sep 11, 2018

Stack:
    :black_circle:  #11502 Improve TypeMeta  💚
    :white_circle:  #12412 [noland] try if global variable on msvc works with CAFFE2_API  💛
    :white_circle:  #12423 [noland] try C10_EXPORT on gcc  💛

TypeMeta now is only a pointer to a TypeMetaData structure, of which there is exactly one global instance per type.
This reduces the size of everything storing a TypeMeta (Tensor, Blob, ...) and potentially improves performance.

Also, this diff gets rid of the type name registry in favor of static strings.

Experiments (summary: 1-3% perf gain)

Differential Revision: D9763422

Differential Revision: D9623916
Differential Version: 56705898
Differential Revision: D9623916
Differential Version: 56858422
Differential Revision: D9644700
Differential Version: 56870160
Differential Revision: D9623916
Differential Version: 56900314
Differential Revision: D9644700
Differential Version: 56900331
Differential Revision: D9652088
Differential Version: 56917655
Differential Revision: D9652088
Differential Version: 56918713
Differential Revision: D9652089
Differential Version: 56918714
Differential Revision: D9623916
Differential Version: 56982469
Differential Revision: D9644700
Differential Version: 56982494
Differential Revision: D9652088
Differential Version: 56982465
Differential Revision: D9652089
Differential Version: 56982470
Differential Revision: D9663476
Differential Version: 56982467
Differential Revision: D9623916
Differential Version: 57101548
Differential Revision: D9644700
Differential Version: 57101652
Differential Revision: D9652088
Differential Version: 57101545
Differential Revision: D9652089
Differential Version: 57101550
Differential Revision: D9663476
Differential Version: 57101556
Differential Revision: D9623916
Differential Version: 57135223
Differential Revision: D9644700
Differential Version: 57135224
Differential Revision: D9652088
Differential Version: 57135218
Differential Revision: D9652089
Differential Version: 57135219
Differential Revision: D9663476
Differential Version: 57135226
Differential Revision: D9694327
Differential Version: 57135227
Differential Revision: D9694326
Differential Version: 57135216
Differential Revision: D9694918
Differential Version: 57140103
Differential Revision: D9623916
Differential Version: 57214033
Differential Revision: D9644700
Differential Version: 57214023
Differential Revision: D9652088
Differential Version: 57214005
Differential Revision: D9652089
Differential Version: 57214030
@smessmer
Copy link
Contributor Author

smessmer commented Oct 5, 2018

@pytorchbot retest this please

@smessmer
Copy link
Contributor Author

smessmer commented Oct 5, 2018

@pytorchbot re-test this please

Differential Revision: D9763422
Differential Version: 59814332
@smessmer smessmer mentioned this pull request Oct 5, 2018
Differential Revision: D9763422
Differential Version: 59857350
Differential Revision: D9763422
Differential Version: 59871561
Differential Revision: D9763422
Differential Version: 59872350
Differential Revision: D9763422
Differential Version: 59872623
Differential Revision: D9763422
Differential Version: 59874179
Differential Revision: D9763422
Differential Version: 59875467
Differential Revision: D9763422
Differential Version: 59876674
Differential Revision: D9763422
Differential Version: 59879239
Differential Revision: D9763422
Differential Version: 59882454
Differential Revision: D9763422
Differential Version: 59883487
Differential Revision: D9763422
Differential Version: 59886110
Differential Revision: D9763422
Differential Version: 59890579
Differential Revision: D9763422
Differential Version: 59898430
Differential Revision: D9763422
Differential Version: 59902014
Differential Revision: D9763422
Differential Version: 59910282
zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 6, 2018
Summary:
Pull Request resolved: pytorch/pytorch#11502

TypeMeta now is only a pointer to a TypeMetaData structure, of which there is exactly one global instance per type.
This reduces the size of everything storing a TypeMeta (Tensor, Blob, ...) and potentially improves performance.

Also, this diff gets rid of the type name registry in favor of static strings.

Experiments (summary: 1-3% perf gain)
- Service Lab: https://our.intern.facebook.com/intern/servicelab/30712497/
 -> No significant results found.
- Mobile Lab c10bench.json: https://our.intern.facebook.com/intern/fblearner/details/75984908/
 -> 1-3% perf gain
- Mobile Lab c10bench default: https://our.intern.facebook.com/intern/fblearner/details/75984999/
 -> 2-3% perf gain
- adindexer canary: https://our.intern.facebook.com/intern/ads/canary/413002142824203076
 -> no significant changes (benchmark too noisy)
- adfinder canary: https://our.intern.facebook.com/intern/ads/canary/413002166737860362
 -> no significant changes (benchmark too noisy)

Reviewed By: dzhulgakov

Differential Revision: D9763422

fbshipit-source-id: fc08937f114af5ff9f3ddbe7c7e396942868cdf5
@soumith soumith deleted the export-D9763422 branch February 21, 2019 12:11
@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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants