Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address reviewer comments #2815

Closed
wants to merge 1 commit into from
Closed

address reviewer comments #2815

wants to merge 1 commit into from

Conversation

TroyGarden
Copy link
Contributor

Summary:

context

  • use at::parallel_for to run a parallel threading in CPU kernel
  • somehow the results are wrong.
(Pdb) outputs[0]
tensor([[-6.4628e-01, -1.9817e+00, -8.4945e-01,  1.3860e+00,  7.4463e-01,
          1.3079e-01,  8.5881e-01, -7.4804e-01],
        [-2.3989e-01,  1.2933e+00,  1.3789e+00, -1.9305e+00, -5.7734e-01,
         -4.5220e-01, -1.3703e+00, -1.9221e+00],
        [ 1.2582e+00,  1.2426e+00,  2.6749e-01,  6.8250e-01,  7.0065e-45,
          0.0000e+00,  0.0000e+00,  0.0000e+00],
        [-4.5382e-02, -9.4207e-01,  7.1254e-01,  7.8096e-01, -1.3482e+00,
         -1.2763e+00,  4.2996e-01, -8.9042e-01],
        [-5.8892e-02,  1.1909e+00, -1.4653e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 1.0306e-01,  2.2235e-01,  1.6044e+00, -3.0457e-01,  1.6609e+00,
          4.1478e-43,  0.0000e+00,  0.0000e+00]],
       grad_fn=<PermuteMultiEmbeddingOp>>)
(Pdb) refs[0]
tensor([[-0.6463, -1.9817, -0.8494,  0.8588, -0.7480, -1.0166,  1.3860,  0.7446],
        [ 1.3572,  0.0403, -0.2078, -0.8592,  0.4000,  1.0562, -0.2399,  1.2933],
        [-0.8118, -0.8703, -0.1429, -0.0802,  0.2706, -0.6728,  1.2582,  1.2426],
        [ 0.0026, -1.3482, -1.2763,  0.9094,  1.2502,  0.5035, -0.0454, -0.9421],
        [-1.4653,  0.8384, -0.3290, -1.2008, -0.4272, -1.0376,  1.0920,  0.2197],
        [ 1.4819,  0.1565, -0.1601, -0.8323, -0.0130,  0.4165,  0.1031,  0.2223]],
       grad_fn=<CatBackward0>)

Reviewed By: sryap

Differential Revision: D38300272

Summary:
# context
* use `at::parallel_for` to run a parallel threading in CPU kernel
* somehow the results are wrong.
```
(Pdb) outputs[0]
tensor([[-6.4628e-01, -1.9817e+00, -8.4945e-01,  1.3860e+00,  7.4463e-01,
          1.3079e-01,  8.5881e-01, -7.4804e-01],
        [-2.3989e-01,  1.2933e+00,  1.3789e+00, -1.9305e+00, -5.7734e-01,
         -4.5220e-01, -1.3703e+00, -1.9221e+00],
        [ 1.2582e+00,  1.2426e+00,  2.6749e-01,  6.8250e-01,  7.0065e-45,
          0.0000e+00,  0.0000e+00,  0.0000e+00],
        [-4.5382e-02, -9.4207e-01,  7.1254e-01,  7.8096e-01, -1.3482e+00,
         -1.2763e+00,  4.2996e-01, -8.9042e-01],
        [-5.8892e-02,  1.1909e+00, -1.4653e+00,  0.0000e+00,  0.0000e+00,
          0.0000e+00,  0.0000e+00,  0.0000e+00],
        [ 1.0306e-01,  2.2235e-01,  1.6044e+00, -3.0457e-01,  1.6609e+00,
          4.1478e-43,  0.0000e+00,  0.0000e+00]],
       grad_fn=<PermuteMultiEmbeddingOp>>)
(Pdb) refs[0]
tensor([[-0.6463, -1.9817, -0.8494,  0.8588, -0.7480, -1.0166,  1.3860,  0.7446],
        [ 1.3572,  0.0403, -0.2078, -0.8592,  0.4000,  1.0562, -0.2399,  1.2933],
        [-0.8118, -0.8703, -0.1429, -0.0802,  0.2706, -0.6728,  1.2582,  1.2426],
        [ 0.0026, -1.3482, -1.2763,  0.9094,  1.2502,  0.5035, -0.0454, -0.9421],
        [-1.4653,  0.8384, -0.3290, -1.2008, -0.4272, -1.0376,  1.0920,  0.2197],
        [ 1.4819,  0.1565, -0.1601, -0.8323, -0.0130,  0.4165,  0.1031,  0.2223]],
       grad_fn=<CatBackward0>)
```

Reviewed By: sryap

Differential Revision: D38300272
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38300272

Copy link

netlify bot commented Jul 9, 2024

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 416d6a2
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/668db5bbab329e000837f94d
😎 Deploy Preview https://deploy-preview-2815--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38300272

3 similar comments
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38300272

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38300272

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D38300272

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in b903979.

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.

2 participants