Skip to content

[SYCL] Enable LIT testing with CUDA BE #1458

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 0 additions & 116 deletions sycl/test/backend/cuda/primary_context.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions sycl/test/basic_tests/boolean.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// XFAIL: cuda
// TODO: investigate incorrect results on cuda backend
#include <CL/sycl.hpp>

#include <cassert>
Expand Down
3 changes: 0 additions & 3 deletions sycl/test/basic_tests/buffer/buffer_full_copy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
// RUN: %GPU_RUN_PLACEHOLDER %t2.out
// RUN: %ACC_RUN_PLACEHOLDER %t2.out

// TODO: cuda_piEnqueueMemBufferCopy not implemented
// XFAIL: cuda

//==------------- buffer_full_copy.cpp - SYCL buffer basic test ------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/all_of.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/any_of.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/broadcast.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/exclusive_scan.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/inclusive_scan.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/group-algorithm/leader.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/none_of.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/group-algorithm/reduce.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>
#include <algorithm>
Expand Down
3 changes: 0 additions & 3 deletions sycl/test/hier_par/hier_par_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out

// TODO: ptxas fatal : Unresolved extern function '__spirv_ControlBarrier'
// XFAIL: cuda

// This test checks hierarchical parallelism invocation APIs, but without any
// data or code with side-effects between the work group and work item scopes.

Expand Down
3 changes: 0 additions & 3 deletions sycl/test/kernel_from_file/hw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@

// TODO: InvalidTargetTriple: Expects spir-unknown-unknown or spir64-unknown-unknown. Actual target triple is x86_64-unknown-linux-gnu

// XFAIL: cuda
// Currently unsupported on cuda as this test specifically tests a SPV path.

#include <CL/sycl.hpp>
#include <iostream>

Expand Down
1 change: 1 addition & 0 deletions sycl/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def getDeviceCount(device_type):
config.available_features.add('gpu')
if cuda:
config.available_features.add('cuda')
gpu_run_substitute += " SYCL_BE=PI_CUDA "

if platform.system() == "Linux":
gpu_run_on_linux_substitute = "env SYCL_DEVICE_TYPE=GPU "
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/multi_ptr/multi_ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
// RUN: %clangxx -DRESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR -fsycl %s -o %t1.out
// RUN: %clangxx -DRESTRICT_WRITE_ACCESS_TO_CONSTANT_PTR -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
Expand Down
3 changes: 1 addition & 2 deletions sycl/test/program_manager/env_vars.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clangxx -O0 -fsycl %s -o %t.out -lsycl
// RUN: %clangxx -O0 -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lsycl
//
// Deprecated SYCL_PROGRAM_BUILD_OPTIONS should work as an alias to
// SYCL_PROGRAM_COMPILE_OPTIONS:
Expand All @@ -16,7 +16,6 @@
// RUN: %CPU_RUN_PLACEHOLDER SYCL_PROGRAM_COMPILE_OPTIONS="-enable-link-options -cl-denorms-are-zero" SHOULD_CRASH=1 %t.out
// RUN: %CPU_RUN_PLACEHOLDER SYCL_PROGRAM_LINK_OPTIONS="-g" SHOULD_CRASH=1 %t.out


#include <CL/sycl.hpp>
#include <cassert>
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion sycl/test/regression/private_array_init_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %clangxx -fsycl %s -o %t.out -lOpenCL
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out -lOpenCL

// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
Expand Down
1 change: 0 additions & 1 deletion sycl/test/regression/static-buffer-dtor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// TODO: terminate called after throwing an instance of 'cl::sycl::runtime_error'
// TODO: what(): OpenCL API failed. OpenCL API returns: -999 (Unknown OpenCL error code) -999 (Unknown OpenCL error code)
// XFAIL: cuda

#include <CL/sycl.hpp>

Expand Down
6 changes: 5 additions & 1 deletion sycl/test/scheduler/DataMovement.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -I %sycl_source_dir %s -o %t.out
// RUN: %t.out
// RUN: %CPU_RUN_PLACEHOLDER %t.out
// RUN: %GPU_RUN_PLACEHOLDER %t.out
// RUN: %ACC_RUN_PLACEHOLDER %t.out
Copy link
Contributor

Choose a reason for hiding this comment

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

@romanovvlad, could you take a look this change, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Host device is now affects only default_selector. So we can test all available devices in this test.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm OK with this change.

// Incorrect event callback processing for host device.
// XFAIL: cuda
//
//==-------------------------- DataMovement.cpp ----------------------------==//
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/allocator_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==---- allocator_vector.cpp - Allocator Container test -------------------==//
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/allocator_vector_fail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==-- allocator_vector_fail.cpp - Device Memory Allocator fail test -------==//
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/allocatorll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==---- allocatorll.cpp - Device Memory Linked List Allocator test --------==//
//
Expand Down
4 changes: 2 additions & 2 deletions sycl/test/usm/badmalloc.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// RUN: %clangxx -fsycl %s -o %t1.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out

// UNSUPPORTED: windows
// UNSUPPORTED: windows,cuda

//==----------------- badmalloc.cpp - Bad Mallocs test ---------------------==//
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/depends_on.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==----------------- depends_on.cpp - depends_on test ---------------------==//
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/dmemll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==------------------- dmemll.cpp - Device Memory Linked List test --------==//
//
Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/hmemll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==------------------- hmemll.cpp - Host Memory Linked List test ----------==//
//
Expand Down
2 changes: 0 additions & 2 deletions sycl/test/usm/math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
// RUN: %CPU_RUN_PLACEHOLDER %t.out

// REQUIRES: cpu
// TODO: ptxas fatal : Unresolved extern function '_Z20__spirv_ocl_lgamma_rfPi'
// XFAIL: cuda

#include <CL/sycl.hpp>

Expand Down
1 change: 1 addition & 0 deletions sycl/test/usm/memadvise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// RUN: env SYCL_DEVICE_TYPE=HOST %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==---------------- memadvise.cpp - Shared Memory Linked List test --------==//
//
Expand Down
3 changes: 2 additions & 1 deletion sycl/test/usm/memcpy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// RUN: %clangxx -fsycl %s -o %t1.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

#include <CL/sycl.hpp>

Expand Down
3 changes: 2 additions & 1 deletion sycl/test/usm/memset.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// RUN: %clangxx -fsycl %s -o %t1.out
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t1.out
// RUN: %CPU_RUN_PLACEHOLDER %t1.out
// RUN: %GPU_RUN_PLACEHOLDER %t1.out
// UNSUPPORTED: cuda

//==---- memset.cpp - USM memset test --------------------------------------==//
//
Expand Down
Loading