@@ -593,33 +593,24 @@ template <int N, template <class, int> class Op, bool UseMask,
593
593
TestFeatures Features, bool UseAcc>
594
594
bool test_fp_types (queue q) {
595
595
bool passed = true ;
596
- if constexpr (Features == TestFeatures::DG2 ||
597
- Features == TestFeatures::PVC) {
598
- if constexpr (std::is_same_v<Op<sycl::half, N>,
599
- ImplLSCFmax<sycl::half, N>> ||
600
- std::is_same_v<Op<sycl::half, N>,
601
- ImplLSCFmin<sycl::half, N>> ||
602
- std::is_same_v<Op<sycl::half, N>,
603
- ImplLSCFcmpwr<sycl::half, N>>) {
604
- auto dev = q.get_device ();
605
- if (dev.has (sycl::aspect::fp16)) {
606
- passed &= run_test<UseAcc, sycl::half, N, Op, UseMask>(q);
607
- }
596
+
597
+ // TODO: Enable 'half' FADD/FSUB on DG2 when the error in GPU driver is fixed.
598
+ if constexpr (Features == TestFeatures::PVC ||
599
+ (Features == TestFeatures::DG2 &&
600
+ !std::is_same_v<Op<sycl::half, N>, ImplFadd<sycl::half, N>> &&
601
+ !std::is_same_v<Op<sycl::half, N>, ImplFsub<sycl::half, N>>)) {
602
+ if (q.get_device ().has (sycl::aspect::fp16)) {
603
+ passed &= run_test<UseAcc, sycl::half, N, Op, UseMask>(q);
608
604
}
609
605
}
610
606
611
607
passed &= run_test<UseAcc, float , N, Op, UseMask>(q);
612
608
613
609
if constexpr (Features == TestFeatures::DG2 ||
614
610
Features == TestFeatures::PVC) {
615
- // TODO: fmin/fmax/fcmpxchg for double requires a newer GPU driver.
616
- if constexpr (!std::is_same_v<Op<double , N>, ImplLSCFmax<double , N>> &&
617
- !std::is_same_v<Op<double , N>, ImplLSCFmin<double , N>> &&
618
- !std::is_same_v<Op<double , N>, ImplLSCFcmpwr<double , N>>) {
619
- if (q.get_device ().has (sycl::aspect::atomic64) &&
620
- q.get_device ().has (sycl::aspect::fp64)) {
621
- passed &= run_test<UseAcc, double , N, Op, UseMask>(q);
622
- }
611
+ if (q.get_device ().has (sycl::aspect::atomic64) &&
612
+ q.get_device ().has (sycl::aspect::fp64)) {
613
+ passed &= run_test<UseAcc, double , N, Op, UseMask>(q);
623
614
}
624
615
}
625
616
return passed;
@@ -633,7 +624,6 @@ bool test_int_types_and_sizes(queue q) {
633
624
passed &= test_int_types<2 , Op, UseMask, Features, UseAcc, SignMask>(q);
634
625
passed &= test_int_types<4 , Op, UseMask, Features, UseAcc, SignMask>(q);
635
626
passed &= test_int_types<8 , Op, UseMask, Features, UseAcc, SignMask>(q);
636
- // TODO: N=16 and N=32 does not pass on Gen12 with mask due to older driver.
637
627
if (UseMask && Features == TestFeatures::Generic &&
638
628
esimd_test::isGPUDriverGE (q, esimd_test::GPUDriverOS::LinuxAndWindows,
639
629
" 26918" , " 101.4953" , false )) {
@@ -645,13 +635,8 @@ bool test_int_types_and_sizes(queue q) {
645
635
if constexpr (Features == TestFeatures::DG2 ||
646
636
Features == TestFeatures::PVC) {
647
637
passed &= test_int_types<64 , Op, UseMask, Features, UseAcc, SignMask>(q);
648
- // non power of two values are supported only in newer driver.
649
- // TODO: Enable this when the new driver reaches test infrastructure
650
- // (v27556).
651
- #if 0
652
638
passed &= test_int_types<12 , Op, UseMask, Features, UseAcc, SignMask>(q);
653
639
passed &= test_int_types<33 , Op, UseMask, Features, UseAcc, SignMask>(q);
654
- #endif
655
640
}
656
641
657
642
return passed;
@@ -672,13 +657,8 @@ bool test_fp_types_and_sizes(queue q) {
672
657
if constexpr (Features == TestFeatures::DG2 ||
673
658
Features == TestFeatures::PVC) {
674
659
passed &= test_fp_types<64 , Op, UseMask, Features, UseAcc>(q);
675
- // non power of two values are supported only in newer driver.
676
- // TODO: Enable this when the new driver reaches test infrastructure
677
- // (v27556).
678
- #if 0
679
660
passed &= test_fp_types<33 , Op, UseMask, Features, UseAcc>(q);
680
661
passed &= test_fp_types<65 , Op, UseMask, Features, UseAcc>(q);
681
- #endif
682
662
}
683
663
return passed;
684
664
}
@@ -705,29 +685,33 @@ int test_with_mask(queue q) {
705
685
test_int_types_and_sizes<ImplUMin, UseMask, Features, UseAcc, Unsigned>(
706
686
q);
707
687
688
+ // Check load/store operations.
689
+ passed &= test_int_types_and_sizes<ImplLoad, UseMask, Features, UseAcc>(q);
690
+ passed &= test_int_types_and_sizes<ImplStore, UseMask, Features, UseAcc>(q);
691
+ // 'float' 'load' and 'store' do not require DG2/PVC.
692
+ passed &= test_fp_types_and_sizes<ImplLoad, UseMask, Features, UseAcc>(q);
693
+ passed &= test_fp_types_and_sizes<ImplStore, UseMask, Features, UseAcc>(q);
694
+
708
695
if constexpr (Features == TestFeatures::DG2 ||
709
696
Features == TestFeatures::PVC) {
710
697
passed &=
711
698
test_fp_types_and_sizes<ImplLSCFmax, UseMask, Features, UseAcc>(q);
712
699
passed &=
713
700
test_fp_types_and_sizes<ImplLSCFmin, UseMask, Features, UseAcc>(q);
714
-
715
- // TODO: fadd/fsub are emulated in the newer driver , but do not pass
716
- // validation .
717
- # if 0
701
+ }
702
+ // TODO: GPU driver promised to support FADD/FSUB on DG2 , but it doesn't.
703
+ // Report the issue to driver, enable FADD/FSUB for DG2 when it is fixed .
704
+ if constexpr (Features == TestFeatures::PVC) {
718
705
passed &= test_fp_types_and_sizes<ImplFadd, UseMask, Features, UseAcc>(q);
719
706
passed &= test_fp_types_and_sizes<ImplFsub, UseMask, Features, UseAcc>(q);
720
- #endif
721
-
722
- // Check load/store operations.
723
- passed &= test_int_types_and_sizes<ImplLoad, UseMask, Features, UseAcc>(q);
724
- passed &= test_int_types_and_sizes<ImplStore, UseMask, Features, UseAcc>(q);
725
- passed &= test_fp_types_and_sizes<ImplStore, UseMask, Features, UseAcc>(q);
726
707
}
727
708
#else
728
709
passed &= test_int_types_and_sizes<ImplCmpxchg, UseMask, Features, UseAcc>(q);
729
- passed &=
730
- test_fp_types_and_sizes<ImplLSCFcmpwr, UseMask, Features, UseAcc>(q);
710
+ if constexpr (Features == TestFeatures::DG2 ||
711
+ Features == TestFeatures::PVC) {
712
+ passed &=
713
+ test_fp_types_and_sizes<ImplLSCFcmpwr, UseMask, Features, UseAcc>(q);
714
+ }
731
715
#endif
732
716
return passed;
733
717
}
0 commit comments