More tests and pic.

pull/3919/head
Jussi Pakkanen 6 years ago
parent 396e355c94
commit 8eca221aac
  1. 3
      mesonbuild/compilers/cuda.py
  2. 1
      run_project_tests.py
  3. 13
      test cases/cuda/2 split/lib.cu
  4. 7
      test cases/cuda/2 split/main.cpp
  5. 7
      test cases/cuda/2 split/meson.build
  6. 13
      test cases/cuda/2 split/static/lib.cu
  7. 13
      test cases/cuda/2 split/static/libsta.cu
  8. 7
      test cases/cuda/2 split/static/main_static.cpp
  9. 4
      test cases/cuda/2 split/static/meson.build

@ -188,3 +188,6 @@ __global__ void kernel (void) {
def linker_to_compiler_args(self, args):
return ['/link'] + args
def get_pic_args(self):
return []

@ -542,6 +542,7 @@ def detect_tests_to_run():
('objective c++', 'objcpp', backend not in (Backend.ninja, Backend.xcode) or mesonlib.is_windows() or not have_objcpp_compiler()),
('fortran', 'fortran', backend is not Backend.ninja or not shutil.which('gfortran')),
('swift', 'swift', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('swiftc')),
('cuda', 'cuda', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('nvcc')),
('python3', 'python3', backend is not Backend.ninja),
('python', 'python', backend is not Backend.ninja),
('fpga', 'fpga', shutil.which('yosys') is None),

@ -0,0 +1,13 @@
#include <stdio.h>
#include <iostream>
__global__ void kernel (void){
}
int do_cuda_stuff() {
kernel<<<1,1>>>();
printf("Hello, World!\n");
return 0;
}

@ -0,0 +1,7 @@
#include<iostream>
int do_cuda_stuff();
int main(int argc, char **argv) {
return do_cuda_stuff();
}

@ -0,0 +1,7 @@
project('simple', 'cuda', 'cpp')
exe = executable('prog', 'main.cpp', 'lib.cu')
test('cudatest', exe)
subdir('static')

@ -0,0 +1,13 @@
#include <stdio.h>
#include <iostream>
__global__ void kernel (void){
}
int do_cuda_stuff() {
kernel<<<1,1>>>();
printf("Hello, World!\n");
return 0;
}

@ -0,0 +1,13 @@
#include <stdio.h>
#include <iostream>
__global__ void kernel (void){
}
int do_cuda_stuff() {
kernel<<<1,1>>>();
printf("Hello, World!\n");
return 0;
}

@ -0,0 +1,7 @@
#include<iostream>
int do_cuda_stuff();
int main(int argc, char **argv) {
return do_cuda_stuff();
}

@ -0,0 +1,4 @@
l = static_library('clib', 'lib.cu')
exe = executable('staexe', 'main_static.cpp',
link_with : l)
test('static Cuda test', exe)
Loading…
Cancel
Save