Skip to content

Commit 380fe4f

Browse files
authored
Add license text for examples (#25)
* License notice for distributed-batch-gemm * License notice for fortran-interface * License text for hash functions * License text for Kokkos example * License text for MPI example * License text for SGEMM * Use licensed version of vector_addition.cu * License text for CUDA interop examples
1 parent 3d80b33 commit 380fe4f

Some content is hidden

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

52 files changed

+1285
-90
lines changed

examples/MPI/Makefile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
#/***************************************************************************
2+
# *
3+
# * Copyright (C) Codeplay Software Ltd.
4+
# *
5+
# * Licensed under the Apache License, Version 2.0 (the "License");
6+
# * you may not use this file except in compliance with the License.
7+
# * You may obtain a copy of the License at
8+
# *
9+
# * http://www.apache.org/licenses/LICENSE-2.0
10+
# *
11+
# * Unless required by applicable law or agreed to in writing, software
12+
# * distributed under the License is distributed on an "AS IS" BASIS,
13+
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# * See the License for the specific language governing permissions and
15+
# * limitations under the License.
16+
# *
17+
# * Codeplay's SYCL-For-CUDA-Examples
18+
# *
19+
# * Makefile
20+
# *
21+
# * Description:
22+
# * Makefile for MPI example
23+
# **************************************************************************/
124
MPICOMP=mpicxx -I${SYCL_ROOT_DIR}/include/sycl/ -O1 -fsycl-unnamed-lambda -std=c++17 -fsycl -fsycl-targets=nvptx64-nvidia-cuda -Wno-linker-warnings
225

326
sycl-mpi-sample: SYCL-MPI-Sample.o

examples/MPI/SYCL-MPI-Sample.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/***************************************************************************
2+
*
3+
* Copyright (C) Codeplay Software Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
* Codeplay's SYCL-For-CUDA-Examples
18+
*
19+
* SYCL-MPI-Sample.cpp
20+
*
21+
* Description:
22+
* Example showing use of MPI with SYCL
23+
**************************************************************************/
124

225
#include <CL/sycl.hpp>
326

examples/cuda_interop/Makefile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
1+
#/***************************************************************************
2+
# *
3+
# * Copyright (C) Codeplay Software Ltd.
4+
# *
5+
# * Licensed under the Apache License, Version 2.0 (the "License");
6+
# * you may not use this file except in compliance with the License.
7+
# * You may obtain a copy of the License at
8+
# *
9+
# * http://www.apache.org/licenses/LICENSE-2.0
10+
# *
11+
# * Unless required by applicable law or agreed to in writing, software
12+
# * distributed under the License is distributed on an "AS IS" BASIS,
13+
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# * See the License for the specific language governing permissions and
15+
# * limitations under the License.
16+
# *
17+
# * Codeplay's SYCL-For-CUDA-Examples
18+
# *
19+
# * Makefile
20+
# *
21+
# * Description:
22+
# * Makefile for CUDA interop
23+
# **************************************************************************/
224

325
CUDACXX=${SYCL_ROOT_DIR}/bin/clang++
426

examples/cuda_interop/vec_add.cu

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
// Original source reproduced unmodified here from:
2-
// https://github.com/olcf/vector_addition_tutorials/blob/master/CUDA/vecAdd.cu
1+
/*
2+
Copyright (c) 2022 Tom Papatheodore
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.
21+
*/
322

423
#include <algorithm>
524
#include <iostream>

examples/cuda_interop/vec_add_usm.cu

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
// Original source reproduced unmodified here from:
2-
// https://github.com/olcf/vector_addition_tutorials/blob/master/CUDA/vecAdd.cu
1+
/*
2+
Copyright (c) 2022 Tom Papatheodore
3+
4+
Permission is hereby granted, free of charge, to any person obtaining a copy
5+
of this software and associated documentation files (the "Software"), to deal
6+
in the Software without restriction, including without limitation the rights
7+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the Software is
9+
furnished to do so, subject to the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included in all
12+
copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
SOFTWARE.
21+
*/
322

423
#include <CL/sycl.hpp>
524
#include <CL/sycl/backend/cuda.hpp>

examples/distrib_batch_gemm/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
#/***************************************************************************
2+
# *
3+
# * Copyright (C) Codeplay Software Ltd.
4+
# *
5+
# * Licensed under the Apache License, Version 2.0 (the "License");
6+
# * you may not use this file except in compliance with the License.
7+
# * You may obtain a copy of the License at
8+
# *
9+
# * http://www.apache.org/licenses/LICENSE-2.0
10+
# *
11+
# * Unless required by applicable law or agreed to in writing, software
12+
# * distributed under the License is distributed on an "AS IS" BASIS,
13+
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# * See the License for the specific language governing permissions and
15+
# * limitations under the License.
16+
# *
17+
# * Codeplay's SYCL-For-CUDA-Examples
18+
# *
19+
# * Makefile
20+
# *
21+
# * Description:
22+
# * Makefile for distributed batch gemm
23+
# **************************************************************************/
24+
125
SYCLCXX=clang++
226
SYCLFLAGS=-O2 -fsycl -fsycl-targets=nvptx64-nvidia-cuda -fsycl-unnamed-lambda -Wno-linker-warnings
327
OBJS=main.o vadd_sycl.o vadd_cuda.o

examples/distrib_batch_gemm/distributed-batch-gemm.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/***************************************************************************
2+
*
3+
* Copyright (C) Codeplay Software Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
* Codeplay's SYCL-For-CUDA-Examples
18+
*
19+
* distributed-batch-gemm.cpp
20+
*
21+
* Description:
22+
* Matrix multiplication distributed across devices using MPI
23+
**************************************************************************/
124
#include <CL/sycl.hpp>
225
#include <CL/sycl/backend/cuda.hpp>
326
#include <algorithm>

examples/distrib_batch_gemm/main.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/***************************************************************************
2+
*
3+
* Copyright (C) Codeplay Software Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
* Codeplay's SYCL-For-CUDA-Examples
18+
*
19+
* main.cpp
20+
*
21+
* Description:
22+
* Demonstrates simple vector addition
23+
**************************************************************************/
124
#include <array>
225
#include <iostream>
326

examples/distrib_batch_gemm/vadd_cuda.cu

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
/***************************************************************************
2+
*
3+
* Copyright (C) Codeplay Software Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
* Codeplay's SYCL-For-CUDA-Examples
18+
*
19+
* vadd_cuda.cu
20+
*
21+
* Description:
22+
* Vector addition in CUDA
23+
**************************************************************************/
124
#include <array>
225

326
// CUDA kernel. Each thread takes care of one element of c

examples/distrib_batch_gemm/vadd_sycl.cpp

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
1+
/***************************************************************************
2+
*
3+
* Copyright (C) Codeplay Software Ltd.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*
17+
* Codeplay's SYCL-For-CUDA-Examples
18+
*
19+
* vadd_sycl.cpp
20+
*
21+
* Description:
22+
* Vector addition in SYCL
23+
**************************************************************************/
224
/* This example is a very small one designed to show how compact SYCL code
325
* can be. That said, it includes no error checking and is rather terse. */
426
#include <CL/sycl.hpp>

0 commit comments

Comments
 (0)