summaryrefslogtreecommitdiff
path: root/libc/test/integration/src/stdlib/gpu/CMakeLists.txt
blob: 5f9a215bb8738bc871106012bfc2fb4f4bfbb974 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
add_custom_target(stdlib-gpu-integration-tests)
add_dependencies(libc-integration-tests stdlib-gpu-integration-tests)

# TODO: Test on NVPTX, requires CUDA VMEM API.
if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
  add_integration_test(
    malloc
    SUITE
      stdlib-gpu-integration-tests
    SRCS
      malloc.cpp
    DEPENDS
      libc.src.stdlib.malloc
      libc.src.stdlib.free
    LOADER_ARGS
      --threads 256
      --blocks 1024
  )

  add_integration_test(
    realloc
    SUITE
      stdlib-gpu-integration-tests
    SRCS
      realloc.cpp
    DEPENDS
      libc.src.stdlib.malloc
      libc.src.stdlib.free
      libc.src.stdlib.realloc
    LOADER_ARGS
      --threads 256
      --blocks 1024
  )

  add_integration_test(
    aligned_alloc
    SUITE
      stdlib-gpu-integration-tests
    SRCS
      aligned_alloc.cpp
    DEPENDS
      libc.src.stdlib.aligned_alloc
      libc.src.stdlib.malloc
      libc.src.stdlib.free
    LOADER_ARGS
      --threads 256
      --blocks 128
  )

  add_integration_test(
    malloc_stress
    SUITE
      stdlib-gpu-integration-tests
    SRCS
      malloc_stress.cpp
    DEPENDS
      libc.src.stdlib.malloc
      libc.src.stdlib.free
    LOADER_ARGS
      --threads 256
      --blocks 2048
  )
endif()