Skip to content

Make ATen-core and caffe2 mutually recursive / merge template data<T>()#11970

Closed
ezyang wants to merge 9 commits intomasterfrom
export-D9967509
Closed

Make ATen-core and caffe2 mutually recursive / merge template data<T>()#11970
ezyang wants to merge 9 commits intomasterfrom
export-D9967509

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Sep 22, 2018

Stack:
    :black_circle:  #11970 Make ATen-core and caffe2 mutually recursive / merge template data()  💚
    :white_circle:  #11971 Merge TensorImpl.  💚

Adds an ATen-core-headers target, which caffe2_cpu_internal depends
on, and makes ATen-core depend on caffe2_headers. If you link against
ATen-core, you must ALSO link against caffe2_cpu_internal; if you
link against caffe2_cpu_internal, you must ALSO link against ATen-core,
otherwise you'll have undefined symbols.

Then, we merge template data() method with Caffe2 implementation,
demonstrating that includes to Caffe2 (core) from ATen/core are working

Differential Revision: D9967509

Differential Revision: D9967509
Differential Version: 58616441
Differential Revision: D9967509
Differential Version: 58638320
Differential Revision: D9967509
Differential Version: 58689896
Differential Revision: D9967509
Differential Version: 58739232
Differential Revision: D9967509
Differential Version: 58745778
Differential Revision: D9967509
Differential Version: 58821972
Differential Revision: D9967509
Differential Version: 58825273
inline T * data() const {
CAFFE_ENFORCE_WITH_CALLER(
storage_.data() || numel_ == 0,
"The tensor is of non-zero shape, but its data is not allocated yet. "

This comment was marked as off-topic.

This comment was marked as off-topic.

Differential Revision: D9967509
Differential Version: 58923258
Differential Revision: D9967509
Differential Version: 59091387
zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 28, 2018
…() (#11970)

Summary:
Pull Request resolved: pytorch/pytorch#11970

Adds an ATen-core-headers target, which caffe2_cpu_internal depends
on, and makes ATen-core depend on caffe2_headers.  If you link against
ATen-core, you must ALSO link against caffe2_cpu_internal; if you
link against caffe2_cpu_internal, you must ALSO link against ATen-core,
otherwise you'll have undefined symbols.

Then, we merge template data<T>() method with Caffe2 implementation,
demonstrating that includes to Caffe2 (core) from ATen/core are working

Reviewed By: jerryzh168

Differential Revision: D9967509

fbshipit-source-id: 3d220c38b2c3c646f8ff2884fdcc889fa9276c7a
@soumith soumith deleted the export-D9967509 branch February 21, 2019 23:26
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants