|
| 1 | +// RUN: dpct %s --out-root %T/semicolon --cuda-include-path="%cuda-path/include" --format-range=none |
| 2 | +// RUN: FileCheck %s --match-full-lines --input-file %T/semicolon/semicolon.dp.cpp |
| 3 | +#include <cudnn.h> |
| 4 | + |
| 5 | +int main() { |
| 6 | + // CHECK: if (true) { |
| 7 | + // CHECK-NEXT: /* |
| 8 | + // CHECK-NEXT: DPCT1026:0: The call to cudnnDestroy was removed because this call is redundant in SYCL. |
| 9 | + // CHECK-NEXT: */ |
| 10 | + // CHECK-NEXT: } |
| 11 | + if (true) { |
| 12 | + cudnnDestroy(nullptr); |
| 13 | + } |
| 14 | + |
| 15 | + // CHECK: if (true) |
| 16 | + // CHECK-NEXT: /* |
| 17 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroy was removed because this call is redundant in SYCL. |
| 18 | + // CHECK-NEXT: */ |
| 19 | + // CHECK-NEXT: ; |
| 20 | + if (true) |
| 21 | + cudnnDestroy(nullptr); |
| 22 | + |
| 23 | + // CHECK: /* |
| 24 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateTensorDescriptor was removed because this call is redundant in SYCL. |
| 25 | + // CHECK-NEXT: */ |
| 26 | + // CHECK-NEXT: if (true) ; |
| 27 | + if (true) cudnnCreateTensorDescriptor(nullptr); |
| 28 | + |
| 29 | + // CHECK: /* |
| 30 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyTensorDescriptor was removed because this call is redundant in SYCL. |
| 31 | + // CHECK-NEXT: */ |
| 32 | + // CHECK-NEXT: if (true) ; |
| 33 | + if (true) cudnnDestroyTensorDescriptor(nullptr); |
| 34 | + |
| 35 | + // CHECK: /* |
| 36 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateActivationDescriptor was removed because this call is redundant in SYCL. |
| 37 | + // CHECK-NEXT: */ |
| 38 | + // CHECK-NEXT: if (true) ; |
| 39 | + if (true) cudnnCreateActivationDescriptor(nullptr); |
| 40 | + |
| 41 | + // CHECK: /* |
| 42 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyActivationDescriptor was removed because this call is redundant in SYCL. |
| 43 | + // CHECK-NEXT: */ |
| 44 | + // CHECK-NEXT: if (true) ; |
| 45 | + if (true) cudnnDestroyActivationDescriptor(nullptr); |
| 46 | + |
| 47 | + // CHECK: /* |
| 48 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateLRNDescriptor was removed because this call is redundant in SYCL. |
| 49 | + // CHECK-NEXT: */ |
| 50 | + // CHECK-NEXT: if (true) ; |
| 51 | + if (true) cudnnCreateLRNDescriptor(nullptr); |
| 52 | + |
| 53 | + // CHECK: /* |
| 54 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyLRNDescriptor was removed because this call is redundant in SYCL. |
| 55 | + // CHECK-NEXT: */ |
| 56 | + // CHECK-NEXT: if (true) ; |
| 57 | + if (true) cudnnDestroyLRNDescriptor(nullptr); |
| 58 | + |
| 59 | + // CHECK: /* |
| 60 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreatePoolingDescriptor was removed because this call is redundant in SYCL. |
| 61 | + // CHECK-NEXT: */ |
| 62 | + // CHECK-NEXT: if (true) ; |
| 63 | + if (true) cudnnCreatePoolingDescriptor(nullptr); |
| 64 | + |
| 65 | + // CHECK: /* |
| 66 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyPoolingDescriptor was removed because this call is redundant in SYCL. |
| 67 | + // CHECK-NEXT: */ |
| 68 | + // CHECK-NEXT: if (true) ; |
| 69 | + if (true) cudnnDestroyPoolingDescriptor(nullptr); |
| 70 | + |
| 71 | + // CHECK: /* |
| 72 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateReduceTensorDescriptor was removed because this call is redundant in SYCL. |
| 73 | + // CHECK-NEXT: */ |
| 74 | + // CHECK-NEXT: if (true) ; |
| 75 | + if (true) cudnnCreateReduceTensorDescriptor(nullptr); |
| 76 | + |
| 77 | + // CHECK: /* |
| 78 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyReduceTensorDescriptor was removed because this call is redundant in SYCL. |
| 79 | + // CHECK-NEXT: */ |
| 80 | + // CHECK-NEXT: if (true) ; |
| 81 | + if (true) cudnnDestroyReduceTensorDescriptor(nullptr); |
| 82 | + |
| 83 | + // CHECK: /* |
| 84 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateOpTensorDescriptor was removed because this call is redundant in SYCL. |
| 85 | + // CHECK-NEXT: */ |
| 86 | + // CHECK-NEXT: if (true) ; |
| 87 | + if (true) cudnnCreateOpTensorDescriptor(nullptr); |
| 88 | + |
| 89 | + // CHECK: /* |
| 90 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyOpTensorDescriptor was removed because this call is redundant in SYCL. |
| 91 | + // CHECK-NEXT: */ |
| 92 | + // CHECK-NEXT: if (true) ; |
| 93 | + if (true) cudnnDestroyOpTensorDescriptor(nullptr); |
| 94 | + |
| 95 | + // CHECK: /* |
| 96 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateFilterDescriptor was removed because this call is redundant in SYCL. |
| 97 | + // CHECK-NEXT: */ |
| 98 | + // CHECK-NEXT: if (true) ; |
| 99 | + if (true) cudnnCreateFilterDescriptor(nullptr); |
| 100 | + |
| 101 | + // CHECK: /* |
| 102 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyFilterDescriptor was removed because this call is redundant in SYCL. |
| 103 | + // CHECK-NEXT: */ |
| 104 | + // CHECK-NEXT: if (true) ; |
| 105 | + if (true) cudnnDestroyFilterDescriptor(nullptr); |
| 106 | + |
| 107 | + // CHECK: /* |
| 108 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateConvolutionDescriptor was removed because this call is redundant in SYCL. |
| 109 | + // CHECK-NEXT: */ |
| 110 | + // CHECK-NEXT: if (true) ; |
| 111 | + if (true) cudnnCreateConvolutionDescriptor(nullptr); |
| 112 | + |
| 113 | + // CHECK: /* |
| 114 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyConvolutionDescriptor was removed because this call is redundant in SYCL. |
| 115 | + // CHECK-NEXT: */ |
| 116 | + // CHECK-NEXT: if (true) ; |
| 117 | + if (true) cudnnDestroyConvolutionDescriptor(nullptr); |
| 118 | + |
| 119 | + // CHECK: /* |
| 120 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateRNNDescriptor was removed because this call is redundant in SYCL. |
| 121 | + // CHECK-NEXT: */ |
| 122 | + // CHECK-NEXT: if (true) ; |
| 123 | + if (true) cudnnCreateRNNDescriptor(nullptr); |
| 124 | + |
| 125 | + // CHECK: /* |
| 126 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnCreateRNNDataDescriptor was removed because this call is redundant in SYCL. |
| 127 | + // CHECK-NEXT: */ |
| 128 | + // CHECK-NEXT: if (true) ; |
| 129 | + if (true) cudnnCreateRNNDataDescriptor(nullptr); |
| 130 | + |
| 131 | + // CHECK: /* |
| 132 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyRNNDescriptor was removed because this call is redundant in SYCL. |
| 133 | + // CHECK-NEXT: */ |
| 134 | + // CHECK-NEXT: if (true) ; |
| 135 | + if (true) cudnnDestroyRNNDescriptor(nullptr); |
| 136 | + |
| 137 | + // CHECK: /* |
| 138 | + // CHECK-NEXT: DPCT1026:{{[0-9]+}}: The call to cudnnDestroyRNNDataDescriptor was removed because this call is redundant in SYCL. |
| 139 | + // CHECK-NEXT: */ |
| 140 | + // CHECK-NEXT: if (true) ; |
| 141 | + if (true) cudnnDestroyRNNDataDescriptor(nullptr); |
| 142 | +} |
0 commit comments