Skip to content

Conversation

@peterjc123
Copy link
Collaborator

The code changes that helps build on Windows.

@peterjc123 peterjc123 changed the title Improve Windows Compatibility(based on Pytorch 0.2.0) Improve Windows Compatibility(for Pytorch 0.2.0) Aug 13, 2017
@peterjc123 peterjc123 changed the title Improve Windows Compatibility(for Pytorch 0.2.0) Improve Windows Compatibility(for 0.2.0) Aug 13, 2017

TH_API THDescBuff _THSizeDesc(const long *size, const long ndim) {
const int L = TH_DESC_BUFF_LEN;
TH_API THDescBuff _THSizeDesc(const uint8_t *size, const uint8_t ndim) {

This comment was marked as off-topic.

This comment was marked as off-topic.

int i = 0, _mask=0;
int64_t K = THLongTensor_nElement(J);
int64_t output_nelem = THLongTensor_nElement(self);
int64_t i = 0, _mask=0;

This comment was marked as off-topic.

This comment was marked as off-topic.

_q = THTensor_fastGet1d(q, rand_ind);

_mask = THRandom_bernoulli(_generator, _q);
_mask = (int) THRandom_bernoulli(_generator, _q);

This comment was marked as off-topic.

#elif defined(USE_MSC_ATOMICS)
assert(sizeof(int) == sizeof(long));
return _InterlockedExchangeAdd((long*)a, value);
//assert(sizeof(int32_t) == sizeof(long));

This comment was marked as off-topic.

@fmassa
Copy link
Member

fmassa commented Aug 13, 2017

Thanks a lot for the PR!

I had a quick look at the TH changes.
Apart from the MappingAllocator part that I didn't follow much, the rest of the changes mostly consist of replacing long with int64_t, int with int32_t etc, and for that they also had to define ureal type in the macros, so that some bits of the code (that used unsigned real) can work.

Also, Travis is failing with a weird error message just before trying to checkout the branch:

$ git checkout -qf FETCH_HEAD

error: unable to create symlink tools/shared/cwrap_common.py: File name too long

@peterjc123
Copy link
Collaborator Author

peterjc123 commented Aug 13, 2017

@fmassa The error is caused by that i changed that file from a symlink to the real copy of the file. Since it can be done through git config, i'll change it back.

@fmassa
Copy link
Member

fmassa commented Aug 13, 2017

Ok, now I got it.
This file was changed and now is causing the issue. I didn't look closely, but why did you need to change it from what it was before?

@peterjc123
Copy link
Collaborator Author

@fmassa Symlinks don't work on Windows on default. I'll change it back later.

@gchanan
Copy link
Contributor

gchanan commented Aug 14, 2017

I don't know if anything has been announced about this, but I think v.0.2.0 should only have bug fixes, not new feature; this is a new feature.

# ifdef _WIN32
# define PyInt_FromLong PyLong_FromLongLong
# else
# define PyInt_FromLong PyLong_FromLong

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@fmassa
Copy link
Member

fmassa commented Aug 14, 2017

@gchanan should he then target merging into master, and not v0.2.0?

@soumith soumith closed this Aug 23, 2017
zou3519 pushed a commit to zou3519/pytorch that referenced this pull request Mar 30, 2018
houseroad added a commit to houseroad/pytorch that referenced this pull request Nov 7, 2019
…7f62f5 (pytorch#29363)

Summary:
Pull Request resolved: pytorch#29363

Previous import was 2891e1459745933f4bba9a8cb3371cf3c9eb1d16

Included changes:
- **[fea8568c](onnx/onnx@fea8568c)**: minor changes to NonZero and Slice (pytorch#2429) <Ashwini Khade>
- **[79bd5042](onnx/onnx@79bd5042)**: fix test bugs for resize op version 11 (pytorch#2425) <Ashwini Khade>
- **[3ea3b0e0](onnx/onnx@3ea3b0e0)**: Add shape existence check in GatherElements shape inference logic (pytorch#2402) <Hariharan Seshadri>
- **[192ad8c8](onnx/onnx@192ad8c8)**: add invite for next workshop (pytorch#2407) <Prasanth Pulavarthi>
- **[eea60812](onnx/onnx@eea60812)**: Fix missing comma in exception message. Causes invalid message depending on what's in memory prior to the constant char string. (pytorch#2403) <Scott McKay>
- **[dd082c99](onnx/onnx@dd082c99)**: Add section headers for easier linking (pytorch#2400) <Prasanth Pulavarthi>
- **[ca1d5b7e](onnx/onnx@ca1d5b7e)**: Add type check for node inputs (pytorch#2367) <RandySheriffH>
- **[e5600091](onnx/onnx@e5600091)**: Update doc loop op (pytorch#2337) <G. Ramalingam>

Test Plan: ci

Reviewed By: hl475

Differential Revision: D18365923

fbshipit-source-id: 29aedd36020db633a946a97bf7d22d9f27f82f09
facebook-github-bot pushed a commit that referenced this pull request Nov 7, 2019
…7f62f5 (#29363)

Summary:
Pull Request resolved: #29363

Previous import was 2891e1459745933f4bba9a8cb3371cf3c9eb1d16

Included changes:
- **[fea8568c](onnx/onnx@fea8568c)**: minor changes to NonZero and Slice (#2429) <Ashwini Khade>
- **[79bd5042](onnx/onnx@79bd5042)**: fix test bugs for resize op version 11 (#2425) <Ashwini Khade>
- **[3ea3b0e0](onnx/onnx@3ea3b0e0)**: Add shape existence check in GatherElements shape inference logic (#2402) <Hariharan Seshadri>
- **[192ad8c8](onnx/onnx@192ad8c8)**: add invite for next workshop (#2407) <Prasanth Pulavarthi>
- **[eea60812](onnx/onnx@eea60812)**: Fix missing comma in exception message. Causes invalid message depending on what's in memory prior to the constant char string. (#2403) <Scott McKay>
- **[dd082c99](onnx/onnx@dd082c99)**: Add section headers for easier linking (#2400) <Prasanth Pulavarthi>
- **[ca1d5b7e](onnx/onnx@ca1d5b7e)**: Add type check for node inputs (#2367) <RandySheriffH>
- **[e5600091](onnx/onnx@e5600091)**: Update doc loop op (#2337) <G. Ramalingam>

Test Plan: ci

Reviewed By: hl475

Differential Revision: D18365923

fbshipit-source-id: 8ac138e3ff9d4fbc5fdf85d06785190334c346a1
samnordmann pushed a commit to samnordmann/pytorch that referenced this pull request Mar 6, 2023
jagadish-amd added a commit to jagadish-amd/pytorch that referenced this pull request Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants