Skip to content

Conversation

@IvanKobzarev
Copy link
Contributor

@IvanKobzarev IvanKobzarev commented Aug 14, 2020

Stack from ghstack:

Differential Revision: D23143354

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
highp: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
mediump: RelaxedPrecision, on storage variable and operation

All shaders starts from #define PRECISION $precision where $precision will be substituted on codegen step (build).

To be able to use CodeTemplate from aten/src/ATen/code_template.py for substitution processing:
moving aten/src/ATen/native/vulkan/gen_glsl.py to aten/src/ATen/gen_vulkan_glsl.py as without it can not import python code from parent directories.

aten/src/ATen/gen_vulkan_glsl.py, aten/src/ATen/gen_vulkan_glsl.py added env argument that specifies list of key-value pairs for substitution, by default env is {"precision": "highp"} and can be overriden adding --env precision=mediump

Some fixes in cpp to fix build for USE_VULKAN_SHADERC_RUNTIME=ON

Differential Revision: [D23143354](https://our.internmc.facebook.com/intern/diff/D23143354)

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
`highp`: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
`mediump`: RelaxedPrecision, on storage variable and operation

All shaders starts from `#define PRECISION $precision` where `$precision` will be substituted on codegen step (build).

To be able to use CodeTemplate from `aten/src/ATen/code_template.py` for substitution processing:
moving `aten/src/ATen/native/vulkan/gen_glsl.py` to `aten/src/ATen/gen_vulkan_glsl.py` as without it can not import python code from parent directories.

`aten/src/ATen/gen_vulkan_glsl.py`, `aten/src/ATen/gen_vulkan_glsl.py` added `env` argument that specifies list of key-value pairs for substitution, by default env is `{"precision": "highp"}` and can be overriden adding `--env precision=mediump`

Some fixes in cpp to fix build for `USE_VULKAN_SHADERC_RUNTIME=ON`




[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Aug 14, 2020
@dr-ci
Copy link

dr-ci bot commented Aug 14, 2020

💊 CI failures summary and remediations

As of commit c7009c5 (more details on the Dr. CI page):



1 job timed out:

  • pytorch_windows_vs2019_py36_cuda10.1_test1

❄️ 2 failures tentatively classified as flaky

but reruns have not yet been triggered to confirm:

See CircleCI build pytorch_linux_bionic_py3_6_clang9_build (1/2)

Step: "Build" (full log | diagnosis details | 🔁 rerun) ❄️

Sep 16 18:39:21 CondaHTTPError: HTTP 000 CONNECTION FAILED for url
Sep 16 18:39:21  
Sep 16 18:39:21 An HTTP error occurred when trying to retrieve this URL. 
Sep 16 18:39:21 HTTP errors are often intermittent, and a simple retry will get you on your way. 
Sep 16 18:39:21  
Sep 16 18:39:21 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/krb5-1.18.2-h173b8e3_0.conda> 
Sep 16 18:39:21 Elapsed: - 
Sep 16 18:39:21  
Sep 16 18:39:21 An HTTP error occurred when trying to retrieve this URL. 
Sep 16 18:39:21 HTTP errors are often intermittent, and a simple retry will get you on your way. 
Sep 16 18:39:21  
Sep 16 18:39:21 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/libcurl-7.71.1-h20c2e04_1.conda> 
Sep 16 18:39:21 Elapsed: - 
Sep 16 18:39:21  
Sep 16 18:39:21 An HTTP error occurred when trying to retrieve this URL. 
Sep 16 18:39:21 HTTP errors are often intermittent, and a simple retry will get you on your way. 
Sep 16 18:39:21  
Sep 16 18:39:21  
Sep 16 18:39:21  
Sep 16 18:39:21 ## Package Plan ## 
Sep 16 18:39:21  
Sep 16 18:39:21   environment location: /opt/conda 

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_build (2/2)

Step: "Build" (full log | diagnosis details | 🔁 rerun) ❄️

Sep 16 18:46:44 CondaHTTPError: HTTP 000 CONNECTION FAILED for url
Sep 16 18:29:08 ++ conda install -q -y cmake 
Sep 16 18:30:08 Collecting package metadata (current_repodata.json): ...working... done 
Sep 16 18:30:09 Solving environment: ...working... done 
Sep 16 18:46:44  
Sep 16 18:46:44 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/krb5-1.18.2-h173b8e3_0.conda> 
Sep 16 18:46:44 Elapsed: - 
Sep 16 18:46:44  
Sep 16 18:46:44 An HTTP error occurred when trying to retrieve this URL. 
Sep 16 18:46:44 HTTP errors are often intermittent, and a simple retry will get you on your way. 
Sep 16 18:46:44  
Sep 16 18:46:44 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/cmake-3.14.0-h52cb24c_0.conda> 
Sep 16 18:46:44 Elapsed: - 
Sep 16 18:46:44  
Sep 16 18:46:44 An HTTP error occurred when trying to retrieve this URL. 
Sep 16 18:46:44 HTTP errors are often intermittent, and a simple retry will get you on your way. 
Sep 16 18:46:44  
Sep 16 18:46:44  
Sep 16 18:46:44  
Sep 16 18:46:44 ## Package Plan ## 
Sep 16 18:46:44  
Sep 16 18:46:44   environment location: /opt/conda 

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 18 times.

Differential Revision: [D23143354](https://our.internmc.facebook.com/intern/diff/D23143354)

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
`highp`: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
`mediump`: RelaxedPrecision, on storage variable and operation

All shaders starts from `#define PRECISION $precision` where `$precision` will be substituted on codegen step (build).

To be able to use CodeTemplate from `aten/src/ATen/code_template.py` for substitution processing:
moving `aten/src/ATen/native/vulkan/gen_glsl.py` to `aten/src/ATen/gen_vulkan_glsl.py` as without it can not import python code from parent directories.

`aten/src/ATen/gen_vulkan_glsl.py`, `aten/src/ATen/gen_vulkan_glsl.py` added `env` argument that specifies list of key-value pairs for substitution, by default env is `{"precision": "highp"}` and can be overriden adding `--env precision=mediump`

Some fixes in cpp to fix build for `USE_VULKAN_SHADERC_RUNTIME=ON`




[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Aug 15, 2020
Differential Revision: [D23143354](https://our.internmc.facebook.com/intern/diff/D23143354)

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
`highp`: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
`mediump`: RelaxedPrecision, on storage variable and operation

All shaders starts from `#define PRECISION $precision` where `$precision` will be substituted on codegen step (build).

To be able to use CodeTemplate from `aten/src/ATen/code_template.py` for substitution processing:
moving `aten/src/ATen/native/vulkan/gen_glsl.py` to `aten/src/ATen/gen_vulkan_glsl.py` as without it can not import python code from parent directories.

`aten/src/ATen/gen_vulkan_glsl.py`, `aten/src/ATen/gen_vulkan_glsl.py` added `env` argument that specifies list of key-value pairs for substitution, by default env is `{"precision": "highp"}` and can be overriden adding `--env precision=mediump`

Some fixes in cpp to fix build for `USE_VULKAN_SHADERC_RUNTIME=ON`




[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 15, 2020
Differential Revision: [D23143354](https://our.internmc.facebook.com/intern/diff/D23143354)

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
`highp`: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
`mediump`: RelaxedPrecision, on storage variable and operation

All shaders starts from `#define PRECISION $precision` where `$precision` will be substituted on codegen step (build).

To be able to use CodeTemplate from `aten/src/ATen/code_template.py` for substitution processing:
moving `aten/src/ATen/native/vulkan/gen_glsl.py` to `aten/src/ATen/gen_vulkan_glsl.py` as without it can not import python code from parent directories.

`aten/src/ATen/gen_vulkan_glsl.py`, `aten/src/ATen/gen_vulkan_glsl.py` added `env` argument that specifies list of key-value pairs for substitution, by default env is `{"precision": "highp"}` and can be overriden adding `--env precision=mediump`

Some fixes in cpp to fix build for `USE_VULKAN_SHADERC_RUNTIME=ON`




[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 15, 2020
Differential Revision: [D23143354](https://our.internmc.facebook.com/intern/diff/D23143354)

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
`highp`: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
`mediump`: RelaxedPrecision, on storage variable and operation

All shaders starts from `#define PRECISION $precision` where `$precision` will be substituted on codegen step (build).

To be able to use CodeTemplate from `aten/src/ATen/code_template.py` for substitution processing:
moving `aten/src/ATen/native/vulkan/gen_glsl.py` to `aten/src/ATen/gen_vulkan_glsl.py` as without it can not import python code from parent directories.

`aten/src/ATen/gen_vulkan_glsl.py`, `aten/src/ATen/gen_vulkan_glsl.py` added `env` argument that specifies list of key-value pairs for substitution, by default env is `{"precision": "highp"}` and can be overriden adding `--env precision=mediump`

Some fixes in cpp to fix build for `USE_VULKAN_SHADERC_RUNTIME=ON`




[ghstack-poisoned]
Differential Revision: [D23143354](https://our.internmc.facebook.com/intern/diff/D23143354)

Introducing cmake option USE_VULKAN_RELAXED_PRECISION that controls which precision will be used in Vullkan shaders.
Default:
`highp`: 32-bit two’s complement for integers, 32-bit IEEE
754 floating-point for float

if USE_VULKAN_RELAXED_PRECISION=ON:
`mediump`: RelaxedPrecision, on storage variable and operation

All shaders starts from `#define PRECISION $precision` where `$precision` will be substituted on codegen step (build).

To be able to use CodeTemplate from `aten/src/ATen/code_template.py` for substitution processing:
moving `aten/src/ATen/native/vulkan/gen_glsl.py` to `aten/src/ATen/gen_vulkan_glsl.py` as without it can not import python code from parent directories.

`aten/src/ATen/gen_vulkan_glsl.py`, `aten/src/ATen/gen_vulkan_glsl.py` added `env` argument that specifies list of key-value pairs for substitution, by default env is `{"precision": "highp"}` and can be overriden adding `--env precision=mediump`

Some fixes in cpp to fix build for `USE_VULKAN_SHADERC_RUNTIME=ON`




[ghstack-poisoned]
IvanKobzarev added a commit that referenced this pull request Sep 16, 2020
@facebook-github-bot
Copy link
Contributor

@IvanKobzarev merged this pull request in 6debe82.

xuzhao9 pushed a commit that referenced this pull request Sep 18, 2020
Summary: Pull Request resolved: #43076

Test Plan: Imported from OSS

Reviewed By: AshkanAliabadi

Differential Revision: D23143354

Pulled By: IvanKobzarev

fbshipit-source-id: 7b3ead1e63cf8acf6e8e547080a8ead7a2db994b
@facebook-github-bot facebook-github-bot deleted the gh/IvanKobzarev/75/head branch September 20, 2020 14:17
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.

5 participants