Skip to content

Commit 16bb7e8

Browse files
authored
[Offload][NFC] Remove all trailing whitespace from offload/ (#92578)
Summary: This patch cleans up the training whitespace in a bunch of tests and CMake files. Most just in preparation for other cleanups.
1 parent 487d5af commit 16bb7e8

File tree

51 files changed

+268
-263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+268
-263
lines changed

offload/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ if (NOT LIBOMPTARGET_LLVM_INCLUDE_DIRS)
134134
message(FATAL_ERROR "Missing definition for LIBOMPTARGET_LLVM_INCLUDE_DIRS")
135135
endif()
136136

137-
if(DEFINED LIBOMPTARGET_BUILD_CUDA_PLUGIN OR
137+
if(DEFINED LIBOMPTARGET_BUILD_CUDA_PLUGIN OR
138138
DEFINED LIBOMPTARGET_BUILD_AMDGPU_PLUGIN)
139139
message(WARNING "Option removed, use 'LIBOMPTARGET_PLUGINS_TO_BUILD' instead")
140140
endif()

offload/DeviceRTL/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ set(src_files
104104
# vectorized accesses to the shared state. Generally, those are "good" but
105105
# the optimizer pipeline (esp. Attributor) does not fully support vectorized
106106
# instructions yet and we end up missing out on way more important constant
107-
# propagation. That said, we will run the vectorizer again after the runtime
107+
# propagation. That said, we will run the vectorizer again after the runtime
108108
# has been linked into the user program.
109109
set(clang_opt_flags -O3 -mllvm -openmp-opt-disable -DSHARED_SCRATCHPAD_SIZE=512 -mllvm -vectorize-slp=false )
110110
set(link_opt_flags -O3 -openmp-opt-disable -attributor-enable=module -vectorize-slp=false )

offload/plugins-nextgen/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function(add_target_library target_name lib_name)
3838
PluginCommon ${OPENMP_PTHREAD_LIB})
3939

4040
target_compile_definitions(${target_name} PRIVATE TARGET_NAME=${lib_name})
41-
target_compile_definitions(${target_name} PRIVATE
41+
target_compile_definitions(${target_name} PRIVATE
4242
DEBUG_PREFIX="TARGET ${lib_name} RTL")
4343
set_target_properties(${target_name} PROPERTIES POSITION_INDEPENDENT_CODE ON)
4444
endfunction()

offload/plugins-nextgen/amdgpu/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ endif()
2828
option(LIBOMPTARGET_FORCE_AMDGPU_TESTS "Build AMDGPU libomptarget tests" OFF)
2929
if (LIBOMPTARGET_FOUND_AMDGPU_GPU OR LIBOMPTARGET_FORCE_AMDGPU_TESTS)
3030
# Report to the parent scope that we are building a plugin for amdgpu
31-
set(LIBOMPTARGET_SYSTEM_TARGETS
31+
set(LIBOMPTARGET_SYSTEM_TARGETS
3232
"${LIBOMPTARGET_SYSTEM_TARGETS} amdgcn-amd-amdhsa" PARENT_SCOPE)
3333
list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.amdgpu")
3434
set(LIBOMPTARGET_TESTED_PLUGINS "${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)

offload/plugins-nextgen/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ target_compile_definitions(PluginCommon PRIVATE
5151
target_compile_options(PluginCommon PUBLIC ${offload_compile_flags})
5252
target_link_options(PluginCommon PUBLIC ${offload_link_flags})
5353

54-
target_include_directories(PluginCommon PUBLIC
54+
target_include_directories(PluginCommon PUBLIC
5555
${CMAKE_CURRENT_SOURCE_DIR}/include
5656
${LIBOMPTARGET_LLVM_INCLUDE_DIRS}
5757
${LIBOMPTARGET_BINARY_INCLUDE_DIR}

offload/plugins-nextgen/cuda/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ endif()
2525
option(LIBOMPTARGET_FORCE_NVIDIA_TESTS "Build NVIDIA libomptarget tests" OFF)
2626
if (LIBOMPTARGET_FOUND_NVIDIA_GPU OR LIBOMPTARGET_FORCE_NVIDIA_TESTS)
2727
libomptarget_say("Enable tests using CUDA plugin")
28-
set(LIBOMPTARGET_SYSTEM_TARGETS
28+
set(LIBOMPTARGET_SYSTEM_TARGETS
2929
"${LIBOMPTARGET_SYSTEM_TARGETS} nvptx64-nvidia-cuda nvptx64-nvidia-cuda-LTO" PARENT_SCOPE)
3030
list(APPEND LIBOMPTARGET_TESTED_PLUGINS "omptarget.rtl.cuda")
3131
set(LIBOMPTARGET_TESTED_PLUGINS "${LIBOMPTARGET_TESTED_PLUGINS}" PARENT_SCOPE)

offload/plugins-nextgen/host/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ endif()
4444

4545
# Define the target specific triples and ELF machine values.
4646
if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64le$")
47-
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
47+
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
4848
"powerpc64le-ibm-linux-gnu" "powerpc64le-ibm-linux-gnu-LTO")
4949
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
5050
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64$")
51-
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
51+
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
5252
"powerpc64-ibm-linux-gnu" "powerpc64-ibm-linux-gnu-LTO")
5353
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
5454
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64$")
55-
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
55+
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
5656
"x86_64-pc-linux-gnu" "x86_64-pc-linux-gnu-LTO")
5757
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
5858
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64$")
59-
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
59+
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
6060
"aarch64-unknown-linux-gnu" "aarch64-unknown-linux-gnu-LTO")
6161
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
6262
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x$")
63-
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
63+
list(APPEND LIBOMPTARGET_SYSTEM_TARGETS
6464
"s390x-ibm-linux-gnu" "s390x-ibm-linux-gnu-LTO")
6565
set(LIBOMPTARGET_SYSTEM_TARGETS "${LIBOMPTARGET_SYSTEM_TARGETS}" PARENT_SCOPE)
6666
endif()

offload/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ add_llvm_library(omptarget
3838
NO_INSTALL_RPATH
3939
BUILDTREE_ONLY
4040
)
41-
target_include_directories(omptarget PRIVATE
41+
target_include_directories(omptarget PRIVATE
4242
${LIBOMPTARGET_INCLUDE_DIR} ${LIBOMPTARGET_BINARY_INCLUDE_DIR}
4343
)
4444

offload/test/mapping/array_section_implicit_capture.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %libomptarget-compile-generic
1+
// RUN: %libomptarget-compile-generic
22
// RUN: %libomptarget-run-generic 2>&1 \
33
// RUN: | %fcheck-generic
44

offload/test/offloading/default_thread_limit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ int main() {
3333
optnone();
3434
}
3535
// DEFAULT: [[NT:(128|256)]] (MaxFlatWorkGroupSize: [[NT]]
36-
#pragma omp target
36+
#pragma omp target
3737
#pragma omp teams distribute parallel for
3838
for (int i = 0; i < N; ++i) {
3939
optnone();

offload/test/offloading/fortran/basic-target-region-1D-array-section.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
! Basic offloading test of arrays with provided lower
1+
! Basic offloading test of arrays with provided lower
22
! and upper bounds as specified by OpenMP's sectioning
33
! REQUIRES: flang
44
! UNSUPPORTED: nvptx64-nvidia-cuda-LTO
@@ -20,7 +20,7 @@ program main
2020
i = i + 1
2121
end do
2222
!$omp end target
23-
23+
2424
print *, write_arr(:)
2525
end program
2626

offload/test/offloading/fortran/basic-target-region-3D-array-section.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ program main
1212
implicit none
1313
integer :: inArray(3,3,3)
1414
integer :: outArray(3,3,3)
15-
integer :: i, j, k
15+
integer :: i, j, k
1616
integer :: j2 = 3, k2 = 3
1717

1818
do i = 1, 3
@@ -25,7 +25,7 @@ program main
2525
end do
2626

2727
j = 1
28-
k = 1
28+
k = 1
2929
!$omp target map(tofrom:inArray(1:3, 1:3, 2:2), outArray(1:3, 1:3, 1:3), j, k, j2, k2)
3030
do while (j <= j2)
3131
k = 1

offload/test/offloading/fortran/double-target-call-with-declare-target.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
! Offloading test with two target regions mapping the same
2-
! declare target Fortran array and writing some values to
3-
! it before checking the host correctly receives the
2+
! declare target Fortran array and writing some values to
3+
! it before checking the host correctly receives the
44
! correct updates made on the device.
55
! REQUIRES: flang
66
! UNSUPPORTED: nvptx64-nvidia-cuda
@@ -35,7 +35,7 @@ program main
3535
i = i + 1
3636
end do
3737
!$omp end target
38-
38+
3939
print *, sp(:)
4040

4141
end program

offload/test/offloading/fortran/target-map-allocatable-map-scopes.f90

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,55 +11,55 @@
1111
! RUN: %libomptarget-compile-fortran-run-and-check-generic
1212
module test
1313
contains
14-
subroutine func_arg(arg_alloc)
14+
subroutine func_arg(arg_alloc)
1515
integer, allocatable, intent (inout) :: arg_alloc(:)
16-
17-
!$omp target map(tofrom: arg_alloc)
16+
17+
!$omp target map(tofrom: arg_alloc)
1818
do index = 1, 10
1919
arg_alloc(index) = arg_alloc(index) + index
2020
end do
2121
!$omp end target
22-
22+
2323
print *, arg_alloc
2424
end subroutine func_arg
25-
end module
26-
27-
subroutine func
28-
integer, allocatable :: local_alloc(:)
25+
end module
26+
27+
subroutine func
28+
integer, allocatable :: local_alloc(:)
2929
allocate(local_alloc(10))
30-
31-
!$omp target map(tofrom: local_alloc)
30+
31+
!$omp target map(tofrom: local_alloc)
3232
do index = 1, 10
3333
local_alloc(index) = index
3434
end do
3535
!$omp end target
36-
36+
3737
print *, local_alloc
38-
38+
3939
deallocate(local_alloc)
40-
end subroutine func
41-
42-
43-
program main
44-
use test
45-
integer, allocatable :: map_ptr(:)
46-
40+
end subroutine func
41+
42+
43+
program main
44+
use test
45+
integer, allocatable :: map_ptr(:)
46+
4747
allocate(map_ptr(10))
48-
49-
!$omp target map(tofrom: map_ptr)
48+
49+
!$omp target map(tofrom: map_ptr)
5050
do index = 1, 10
5151
map_ptr(index) = index
5252
end do
5353
!$omp end target
5454

55-
call func
55+
call func
5656

5757
print *, map_ptr
5858

5959
call func_arg(map_ptr)
6060

6161
deallocate(map_ptr)
62-
end program
62+
end program
6363

6464
! CHECK: 1 2 3 4 5 6 7 8 9 10
6565
! CHECK: 1 2 3 4 5 6 7 8 9 10

offload/test/offloading/fortran/target-map-derived-type-full-1.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Offloading test checking interaction of an
2-
! explicit derived type mapping when mapped
2+
! explicit derived type mapping when mapped
33
! to target and assinging one derived type
44
! to another
55
! REQUIRES: flang, amdgcn-amd-amdhsa
@@ -16,22 +16,22 @@ program main
1616
integer(4) :: ix = 0
1717
real(4) :: rx = 0.0
1818
complex(4) :: zx = (0,0)
19-
end type scalar
20-
19+
end type scalar
20+
2121
type(scalar) :: in
2222
type(scalar) :: out
2323
in%ix = 10
2424
in%rx = 2.0
2525
in%zx = (2, 10)
26-
26+
2727
!$omp target map(from:out) map(to:in)
28-
out = in
28+
out = in
2929
!$omp end target
30-
30+
3131
print*, in%ix
3232
print*, in%rx
3333
write (*,*) in%zx
34-
34+
3535
print*, out%ix
3636
print*, out%rx
3737
write (*,*) out%zx

offload/test/offloading/fortran/target-map-derived-type-full-2.f90

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Offloading test checking interaction of an
2-
! explicit derived type mapping when mapped to
2+
! explicit derived type mapping when mapped to
33
! target and assigning to individual members
44
! REQUIRES: flang, amdgcn-amd-amdhsa
55
! UNSUPPORTED: nvptx64-nvidia-cuda
@@ -16,29 +16,29 @@ program main
1616
real(4) :: rx = 0.0
1717
complex(4) :: zx = (0,0)
1818
integer(4) :: array(5)
19-
end type scalar
20-
19+
end type scalar
20+
2121
type(scalar) :: out
2222
type(scalar) :: in
23-
23+
2424
in%ix = 10
2525
in%rx = 2.0
2626
in%zx = (2, 10)
27-
27+
2828
do i = 1, 5
2929
in%array(i) = i
30-
end do
31-
30+
end do
31+
3232
!$omp target map(from:out) map(to:in)
3333
out%ix = in%ix
3434
out%rx = in%rx
3535
out%zx = in%zx
36-
36+
3737
do i = 1, 5
3838
out%array(i) = in%array(i)
39-
end do
39+
end do
4040
!$omp end target
41-
41+
4242
print*, in%ix
4343
print*, in%rx
4444
print*, in%array

offload/test/offloading/fortran/target-map-derived-type-full-implicit-1.f90

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
! Offloading test checking interaction of an
2-
! implicit derived type mapping when mapped
2+
! implicit derived type mapping when mapped
33
! to target and assinging one derived type
44
! to another
55
! REQUIRES: flang, amdgcn-amd-amdhsa
@@ -16,18 +16,18 @@ program main
1616
integer(4) :: ix = 0
1717
real(4) :: rx = 0.0
1818
complex(4) :: zx = (0,0)
19-
end type scalar
20-
19+
end type scalar
20+
2121
type(scalar) :: in
2222
type(scalar) :: out
2323
in%ix = 10
2424
in%rx = 2.0
2525
in%zx = (2, 10)
26-
26+
2727
!$omp target map(from:out)
28-
out = in
28+
out = in
2929
!$omp end target
30-
30+
3131
print*, in%ix
3232
print*, in%rx
3333
write (*,*) in%zx
@@ -43,4 +43,3 @@ end program main
4343
!CHECK: 10
4444
!CHECK: 2.
4545
!CHECK: (2.,10.)
46-

0 commit comments

Comments
 (0)