Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL][CUDA][BFLOAT16]Temp oneapi test file adds unary cov.. #889

Merged
merged 9 commits into from
Apr 5, 2022

Conversation

JackAKirk
Copy link

..erage

fixes broken verify_logic test.

Requires: intel/llvm#5393

Once a backend agnostic ext_oneapi_bf16 aspect is added we can add the patches from this file to the existing bfloat16 test.
Until then the cuda backend requires the Target provided at compile time to use the Target_Builtins.

..erage

fixes broken verify_logic test.

Once a backend agnostic ext_oneapi_bf16 aspect is added we can add the patches from this file to the existing bfloat16 test.
Until then the cuda backend requires the Target provided at compile time to use the Target_Builtins.
@JackAKirk
Copy link
Author

This PR can be used to test intel/llvm#5393. Once intel/llvm#5393 is merged I will move the cuda specific test file into the existing bfloat16_type.cpp file. Having two separate files for now helps me be sure that both test files should pass.

@bader
Copy link

bader commented Apr 1, 2022

This PR can be used to test intel/llvm#5393. Once intel/llvm#5393 is merged I will move the cuda specific test file into the existing bfloat16_type.cpp file. Having two separate files for now helps me be sure that both test files should pass.

intel/llvm#5393 must be committed with the test changes, otherwise llvm-test-suite will report failures in pre-commit as you can see in intel/llvm#5393 test results.
@JackAKirk, please, fix formatting and complete code review for test changes.

Integrated CUDA specific changes into bfloat16_type.cpp as well as new unary neg unit test case.
@JackAKirk
Copy link
Author

/verify with intel/llvm#5393

@JackAKirk JackAKirk marked this pull request as ready for review April 4, 2022 08:07
@JackAKirk JackAKirk requested a review from a team as a code owner April 4, 2022 08:07
@JackAKirk
Copy link
Author

This PR can be used to test intel/llvm#5393. Once intel/llvm#5393 is merged I will move the cuda specific test file into the existing bfloat16_type.cpp file. Having two separate files for now helps me be sure that both test files should pass.

intel/llvm#5393 must be committed with the test changes, otherwise llvm-test-suite will report failures in pre-commit as you can see in intel/llvm#5393 test results. @JackAKirk, please, fix formatting and complete code review for test changes.

I've fixed the formatting and used a single test file. The test passes for me locally for all backends using intel/llvm#5393 (As previously the test is only built for backends other than CUDA, now the test is also executed for the CUDA case).

@bader
Copy link

bader commented Apr 4, 2022

The test passes for me locally for all backends using intel/llvm#5393

The test failed in CI system for all backends using intel/llvm#5393.
http://pre-commit.llvm.intel.com:8013/file_review?path_name=/llvm_test_suite_associate/PR5393/e433fbcac8

Intel GPU

[2022-04-01T20:32:07.216Z] ******************** TEST 'SYCL :: BFloat16/bfloat16_type.cpp' FAILED ********************
[2022-04-01T20:32:07.216Z] Script:
[2022-04-01T20:32:07.216Z] --
[2022-04-01T20:32:07.216Z] : 'RUN: at line 2';    /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/llvm.obj/bin/clang++      -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp -o /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out
[2022-04-01T20:32:07.216Z] : 'RUN: at line 3';   env SYCL_DEVICE_FILTER=cuda /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out
[2022-04-01T20:32:07.216Z] : 'RUN: at line 4';    /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/llvm.obj/bin/clang++      -fsycl -fsycl-targets=spir64 /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp -o /CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out
[2022-04-01T20:32:07.216Z] --
[2022-04-01T20:32:07.216Z] Exit Code: 1
[2022-04-01T20:32:07.216Z] 
[2022-04-01T20:32:07.216Z] Command Output (stdout):
[2022-04-01T20:32:07.216Z] --
[2022-04-01T20:32:07.216Z] $ ":" "RUN: at line 2"
[2022-04-01T20:32:07.216Z] note: command had no output on stdout or stderr
[2022-04-01T20:32:07.216Z] $ "/CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/llvm.obj/bin/clang++" "-fsycl" "-fsycl-targets=nvptx64-nvidia-cuda" "-Xsycl-target-backend" "--cuda-gpu-arch=sm_80" "/CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp" "-o" "/CI_SYSTEMS/CI_DISPATCHER2917704_00/runDir/jenkins-dir/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out"
[2022-04-01T20:32:07.216Z] # command stderr:
[2022-04-01T20:32:07.216Z] clang-15: error: cannot find 'remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
[2022-04-01T20:32:07.216Z] clang-15: error: cannot find 'remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc'; provide path to libspirv library via '-fsycl-libspirv-path', or pass '-fno-sycl-libspirv' to build without linking with libspirv
[2022-04-01T20:32:07.216Z] 
[2022-04-01T20:32:07.216Z] error: command failed with exit status: 1
[2022-04-01T20:32:07.216Z] 
[2022-04-01T20:32:07.216Z] --
[2022-04-01T20:32:07.216Z] 
[2022-04-01T20:32:07.216Z] ********************

NVIDIA GPU

[2022-04-01T20:04:35.293Z] ******************** TEST 'SYCL :: BFloat16/bfloat16_type.cpp' FAILED ********************
[2022-04-01T20:04:35.293Z] Script:
[2022-04-01T20:04:35.293Z] --
[2022-04-01T20:04:35.293Z] : 'RUN: at line 2';    /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.obj/bin/clang++      -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Xsycl-target-backend --cuda-gpu-arch=sm_80 /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp -o /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out
[2022-04-01T20:04:35.293Z] : 'RUN: at line 3';   env SYCL_DEVICE_FILTER=cuda /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out
[2022-04-01T20:04:35.294Z] : 'RUN: at line 4';    /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.obj/bin/clang++      -fsycl -fsycl-targets=spir64 /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp -o /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out
[2022-04-01T20:04:35.294Z] --
[2022-04-01T20:04:35.294Z] Exit Code: -6
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] Command Output (stdout):
[2022-04-01T20:04:35.294Z] --
[2022-04-01T20:04:35.294Z] $ ":" "RUN: at line 2"
[2022-04-01T20:04:35.294Z] note: command had no output on stdout or stderr
[2022-04-01T20:04:35.294Z] $ "/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.obj/bin/clang++" "-fsycl" "-fsycl-targets=nvptx64-nvidia-cuda" "-Xsycl-target-backend" "--cuda-gpu-arch=sm_80" "/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp" "-o" "/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out"
[2022-04-01T20:04:35.294Z] # command stderr:
[2022-04-01T20:04:35.294Z] warning: linking module '/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.obj/lib/clang/15.0.0/../../clc/remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc': Linking two modules of different target triples: '/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.obj/lib/clang/15.0.0/../../clc/remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc' is 'nvptx64-unknown-nvidiacl' whereas '/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm-test-suite/SYCL/BFloat16/bfloat16_type.cpp' is 'nvptx64-nvidia-cuda'
[2022-04-01T20:04:35.294Z]  [-Wlinker-warnings]
[2022-04-01T20:04:35.294Z] 1 warning generated.
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] $ ":" "RUN: at line 3"
[2022-04-01T20:04:35.294Z] note: command had no output on stdout or stderr
[2022-04-01T20:04:35.294Z] $ "env" "SYCL_DEVICE_FILTER=cuda" "/localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/build/SYCL/BFloat16/Output/bfloat16_type.cpp.tmp.out"
[2022-04-01T20:04:35.294Z] # command stderr:
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] PI CUDA ERROR:
[2022-04-01T20:04:35.294Z] 	Value:           209
[2022-04-01T20:04:35.294Z] 	Name:            CUDA_ERROR_NO_BINARY_FOR_GPU
[2022-04-01T20:04:35.294Z] 	Description:     no kernel image is available for execution on the device
[2022-04-01T20:04:35.294Z] 	Function:        build_program
[2022-04-01T20:04:35.294Z] 	Source Location: /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.src/sycl/plugins/cuda/pi_cuda.cpp:559
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] PI CUDA ERROR:
[2022-04-01T20:04:35.294Z] 	Value:           400
[2022-04-01T20:04:35.294Z] 	Name:            CUDA_ERROR_INVALID_HANDLE
[2022-04-01T20:04:35.294Z] 	Description:     invalid resource handle
[2022-04-01T20:04:35.294Z] 	Function:        cuda_piProgramRelease
[2022-04-01T20:04:35.294Z] 	Source Location: /localdisk2/iusers/nstester/Codeplay/workspace/SYCL_CI/intel/Lin/LLVM_Test_Suite_CUDA/llvm.src/sycl/plugins/cuda/pi_cuda.cpp:3265
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] terminate called after throwing an instance of 'cl::sycl::compile_program_error'
[2022-04-01T20:04:35.294Z]   what():  The program was built for 1 devices
[2022-04-01T20:04:35.294Z] Build program log for 'NVIDIA TITAN RTX':
[2022-04-01T20:04:35.294Z]  -999 (Unknown OpenCL error code)
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] error: command failed with exit status: -6
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] --
[2022-04-01T20:04:35.294Z] 
[2022-04-01T20:04:35.294Z] ********************

Does it make sense to re-run the tests? These were gathered 3 days ago.

@JackAKirk
Copy link
Author

The test passes for me locally for all backends using intel/llvm#5393

The test failed in CI system for all backends using intel/llvm#5393. http://pre-commit.llvm.intel.com:8013/file_review?path_name=/llvm_test_suite_associate/PR5393/e433fbcac8

Does it make sense to re-run the tests? These were gathered 3 days ago.

I understand the failures now:

  • CUDA failed because the CI is not sm_80 so we can compile the test but not run it: I've now removed the run part of the CUDA test.
  • Others failed because they cannot compile the CUDA part. I've used two separate test files for the lit test again: CUDA requires the additional arch flags. I'm not sure if there is a better way to run CUDA and others from the same file.

Although I do not see the link for http://pre-commit.llvm.intel.com:8013/file_review?path_name=llvm_test_suite_associate/PR5393 on this page, I can access the link. However it only shows the tests from 31/3 and 1/4. I cannot see the test that was executed today. Interestingly the 31/3 test passed (When I originally used the two files) even though the checks were not successful according to this page. This may mean that the checks executed today were successful? But I don't have access to the logs.

@bader
Copy link

bader commented Apr 4, 2022

You should add another "/verify with intel/llvm#5393" comment to re-run the tests with intel/llvm#5393. Jenkins systems is using latest available nightly build for testing by default.

@JackAKirk
Copy link
Author

You should add another "/verify with intel/llvm#5393" comment to re-run the tests with intel/llvm#5393. Jenkins systems is using latest available nightly build for testing by default.

Ah OK thanks.

@JackAKirk
Copy link
Author

/verify with intel/llvm#5393

@JackAKirk
Copy link
Author

/verify with intel/llvm#5393

@JackAKirk
Copy link
Author

This PR can be used to test intel/llvm#5393. Once intel/llvm#5393 is merged I will move the cuda specific test file into the existing bfloat16_type.cpp file. Having two separate files for now helps me be sure that both test files should pass.

intel/llvm#5393 must be committed with the test changes, otherwise llvm-test-suite will report failures in pre-commit as you can see in intel/llvm#5393 test results. @JackAKirk, please, fix formatting and complete code review for test changes.

Thanks for the tips. The new logs have appeared for me at the bottom and have passed.

bader pushed a commit to intel/llvm that referenced this pull request Apr 5, 2022
…5393)

There is a bug in the verify_logic function in the bfloat16_type.cpp test (C accessor is not written to) - I'm not sure how this did not lead to a failure already.  With the bug fixed the test passes for the CUDA backend with this patch. I've added a draft test file that also increases the coverage to test unary minus operator here: intel/llvm-test-suite#889.

Note that the unary neg intrinsic added here that is used in unary minus will be pulled down from upstream via e.g. https://reviews.llvm.org/D117887.
@bader bader merged commit 5d7d836 into intel:intel Apr 5, 2022
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Jun 17, 2022
…el#889)

Fixes broken verify_logic test.

Once a backend agnostic ext_oneapi_bf16 aspect is added we can add the patches from this file to the existing bfloat16 test.
Until then the cuda backend requires the Target provided at compile time to use the Target_Builtins.
myler added a commit to myler/llvm-test-suite that referenced this pull request Jun 17, 2022
CMPLRTST-16319: skip more double type tests on GEN11/GEN12 GPU
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…el/llvm-test-suite#889)

Fixes broken verify_logic test.

Once a backend agnostic ext_oneapi_bf16 aspect is added we can add the patches from this file to the existing bfloat16 test.
Until then the cuda backend requires the Target provided at compile time to use the Target_Builtins.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants