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

[pytorch-vulkan] add aten::randn_like & aten::normal_ #109075

Closed
wants to merge 1 commit into from

Commits on Sep 12, 2023

  1. [pytorch-vulkan] add aten::randn_like & aten::normal_ (pytorch#109075)

    Summary:
    Implemented `aten::normal_` shader and used it to create `aten::randn_like`.
    
    Ops defintions:
    https://pytorch.org/docs/stable/generated/torch.randn_like.html
    https://pytorch.org/docs/stable/generated/torch.Tensor.normal_.html
    
    
    Test Plan:
    ```
    [ttingchulin@53491.od /data/sandcastle/boxes/fbsource (randn)]$ LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck run fbcode/mode/dev-nosan //xplat/caffe2:pt_vulkan_api_test_bin  -- --gtest_filter="*<test>*" eg.  -- --gtest_filter="*randn_like*"
    
    [==========] Running 2 tests from 1 test suite.
    [----------] Global test environment set-up.
    [----------] 2 tests from VulkanAPITest
    [ RUN      ] VulkanAPITest.randn_like
    [       OK ] VulkanAPITest.randn_like (230 ms)
    [ RUN      ] VulkanAPITest.randn_like_large
    [       OK ] VulkanAPITest.randn_like_large (570 ms)
    [----------] 2 tests from VulkanAPITest (801 ms total)
    
    [----------] Global test environment tear-down
    [==========] 2 tests from 1 test suite ran. (801 ms total)
    [  PASSED  ] 2 tests.
    
    [ttingchulin@53491.od /data/sandcastle/boxes/fbsource (randn)]$ LD_LIBRARY_PATH=third-party/swiftshader/lib/linux-x64/ buck run fbcode/mode/dev-nosan //xplat/caffe2:pt_vulkan_api_test_bin  -- --gtest_filter="*<test>*" eg.  -- --gtest_filter="*normal_*"
    [==========] Running 3 tests from 1 test suite.
    [----------] Global test environment set-up.
    [----------] 3 tests from VulkanAPITest
    [ RUN      ] VulkanAPITest.normal_
    [       OK ] VulkanAPITest.normal_ (222 ms)
    [ RUN      ] VulkanAPITest.normal_large
    [       OK ] VulkanAPITest.normal_large (136 ms)
    [ RUN      ] VulkanAPITest.normal_error
    [       OK ] VulkanAPITest.normal_error (37 ms)
    [----------] 3 tests from VulkanAPITest (396 ms total)
    
    [----------] Global test environment tear-down
    [==========] 3 tests f.
    ```
    
    Differential Revision: D48814024
    
    Pulled By: tina134
    tina134 authored and facebook-github-bot committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    3d861cf View commit details
    Browse the repository at this point in the history