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

[SYCL] Add bfloat16 'hello world' host test. #1189

Merged
merged 10 commits into from
Sep 5, 2022

Conversation

kbobrovs
Copy link

Test for intel/llvm#6675.
Signed-off-by: Konstantin S Bobrovsky [email protected]

Signed-off-by: Konstantin S Bobrovsky <[email protected]>
@kbobrovs
Copy link
Author

/verify with intel/llvm#6675

@kbobrovs
Copy link
Author

/verify with intel/llvm#6675

2 similar comments
@kbobrovs
Copy link
Author

/verify with intel/llvm#6675

@kbobrovs
Copy link
Author

/verify with intel/llvm#6675

AlexeySachkov
AlexeySachkov previously approved these changes Aug 31, 2022
@@ -0,0 +1,50 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %HOST_RUN_PLACEHOLDER %t.out

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// RUN: %HOST_RUN_PLACEHOLDER %t.out

Host device is going to be removed soon. Moreover, you don't even use any devices in the test, so no need for any special placeholders

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a single_task to verify it works on device as well then?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I just say
// RUN: %t.out
?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a single_task to verify it works on device as well then?

Yes, good idea. But this is E2E regression test for particular problem I found on host. Test coverage can be improved in separate patches, I believe.

@kbobrovs
Copy link
Author

/verify with intel/llvm#6675

@asudarsa
Copy link

Adding @rdeodhar who is working on moving bfloat16 support out of experimental. Rajiv,
can you please take a look? Thanks

@rdeodhar
Copy link

rdeodhar commented Aug 31, 2022

We're moving towards removing the to_float and from_float public interfaces. Also, raw is being removed. This will check the conversions:

bfloat16 bf{3.140625f};
if (bf.float() == 3.140625f) then "pass"

@kbobrovs
Copy link
Author

kbobrovs commented Sep 1, 2022

We're moving towards removing the to_float and from_float public interfaces. Also, raw is being removed. This will check the conversions:

bfloat16 bf{3.140625f};
if (bf.float() == 3.140625f) then "pass"

I use neither to_float nor from_float - ?

@kbobrovs
Copy link
Author

kbobrovs commented Sep 1, 2022

... but I use raw(). OK will try to get away only with constructors and bitcasts

@kbobrovs
Copy link
Author

kbobrovs commented Sep 1, 2022

@rdeodhar, @aelovikov-intel, @AlexeySachkov - please review

@kbobrovs
Copy link
Author

kbobrovs commented Sep 1, 2022

/verify with intel/llvm#6675

@@ -0,0 +1,60 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %t.out

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if that is what we're supposed to do, but I honestly don't know.

Maybe someone else from @intel/llvm-reviewers-runtime know.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

@rdeodhar
Copy link

rdeodhar commented Sep 1, 2022

Looks OK.

@kbobrovs
Copy link
Author

kbobrovs commented Sep 1, 2022

/verify with intel/llvm#6675

@kbobrovs
Copy link
Author

kbobrovs commented Sep 2, 2022

Testing with intel/llvm#6675 has only known TGL-specific failures on Windows

[2022-09-01T22:56:01.536Z] SYCL :: AtomicRef/assignment_atomic64.cpp
[2022-09-01T22:56:01.536Z] SYCL :: AtomicRef/assignment_atomic64_generic.cpp
[2022-09-01T22:56:01.536Z] SYCL :: Basic/buffer/buffer.cpp
[2022-09-01T22:56:01.537Z] SYCL :: DeprecatedFeatures/SpecConsts1.2.1/specialization_constants.cpp
[2022-09-01T22:56:01.537Z] SYCL :: DeprecatedFeatures/SpecConsts1.2.1/specialization_constants_override.cpp
[2022-09-01T22:56:01.537Z] SYCL :: DeviceLib/built-ins/nan.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/aot_mixed.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/bin_and_cmp_ops_heavy.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/ctors/ctor_converting_fp_extra.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/ctors/ctor_load_acc_fp_extra.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/ctors/ctor_load_usm_fp_extra.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/functions/functions_select_2d_core.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/functions/functions_select_2d_fp_extra.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/operators/operator_decrement_and_increment_accuracy_fp_extra.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/functional/operators/operator_decrement_and_increment_fp_extra.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/replicate_smoke.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/saturation_smoke.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/simd_view_select_2d_fp.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/simd_view_select_2d_int.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/api/unary_ops_heavy.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/ext_math.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/matrix_transpose_glb.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/regression/dgetrf.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/regression/dgetrf_8x8.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/regression/dgetrf_ref.cpp
[2022-09-01T22:56:01.537Z] SYCL :: ESIMD/spec_const/spec_const_double.cpp
[2022-09-01T22:56:01.537Z] SYCL :: GroupAlgorithm/SYCL2020/sort.cpp
[2022-09-01T22:56:01.537Z] SYCL :: KernelParams/union_kernel_param.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SpecConstants/2020/handler-api.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SpecConstants/2020/kernel-bundle-api.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SubGroup/barrier.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SubGroup/broadcast_fp64.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SubGroup/info.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SubGroup/load_store.cpp
[2022-09-01T22:56:01.537Z] SYCL :: SubGroup/shuffle_fp64.cpp
[2022-09-01T22:56:01.537Z] SYCL :: USM/copy.cpp
[2022-09-01T22:56:01.537Z] SYCL :: USM/fill.cpp

@kbobrovs
Copy link
Author

kbobrovs commented Sep 5, 2022

bfloat_hw.cpp passed everywhere

@kbobrovs kbobrovs merged commit 2fef19b into intel:intel Sep 5, 2022
myler pushed a commit to myler/llvm-test-suite that referenced this pull request Mar 22, 2023
* [SYCL] Add bfloat16 'hello world' host test.

Signed-off-by: Konstantin S Bobrovsky <[email protected]>
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
)

* [SYCL] Add bfloat16 'hello world' host test.

Signed-off-by: Konstantin S Bobrovsky <[email protected]>
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.

6 participants