Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SYCL/ComputeCpp and libraries #1339

Closed
mattgodbolt opened this issue Apr 5, 2019 · 13 comments
Closed

Add SYCL/ComputeCpp and libraries #1339

mattgodbolt opened this issue Apr 5, 2019 · 13 comments
Labels
new-compilers request Request for something

Comments

@mattgodbolt
Copy link
Member

Compiler: https://www.codeplay.com/products/computesuite/computecpp - NB EULA needs looking at.

Also worth looking at:

Requested by Jan Wilmans over email.

@mattgodbolt
Copy link
Member Author

Clicking the link: it requires registratration. EULA below:


---------------------------------------------------------------------

SOFTWARE LICENSE AGREEMENT

---------------------------------------------------------------------
---------------------------------------------------------------------

By downloading, installing, copying, or otherwise using the
ComputeCpp Community Edition software, including any associated
components, media, printed materials, and electronic documentation
("Software"), the user agrees to the following terms and conditions
of this Software License Agreement ("Agreement"). Please read the
terms of this Agreement carefully before beginning your download, as
pressing the "I AGREE" button at the end of this Agreement will
confirm your assent. If you do not agree to these terms, then
Codeplay Software Limited is unwilling to license the Software to
you; so please press the "CANCEL" button to cancel your download.

1. License. Codeplay Software Ltd., a company incorporated in
England and Wales with registered number 04567874 and having its
registered office at Regent House, 316 Beulah Hill, London,
United Kingdom, SE19 3HF ("Codeplay") hereby grants the user,
free of charge, a non-exclusive worldwide license to use and
replicate (but not modify) the Software for any use, whether
commercial or non-commercial, in accordance with this Agreement.
Codeplay reserves all rights to the Software that are not
expressly granted by this Agreement.
2. Redistribution. The user may copy and redistribute unmodified
copies of only those components of the Software which are
specified below ("Redistributable Components"), in object code
form, as part of the user’s software applications or libraries
("Applications"). The user acknowledges and agrees that it has no
right to modify the Redistributable Components in any way. Any
use of the Redistributable Components within the user’s
Applications will continue to be subject to the terms and
conditions of this Agreement, and the user must also distribute a
copy of this Agreement and reproduce and include all notices of
copyrights or other proprietary rights in the Software. The
user’s redistribution of the Redistributable Components will not
entitle it to any payment from Codeplay. The user may not
transfer any of its rights or obligations under this Agreement.

+-------------------------------------------+
|Redistributable Component|File Name |
|-------------------------+-----------------|
|Runtime (for Linux) |libComputeCpp.so |
|-------------------------+-----------------|
|Runtime (for Windows) |libComputeCpp.dll|
+-------------------------------------------+

3. Restrictions. The user shall not:

a. circumvent or bypass any technological protection measures in
or relating to the Software;
b. use the Software to perform any unauthorized transfer of
information or for any illegal purpose;
c. de-compile, decrypt, disassemble, hack, emulate, exploit or
reverse-engineer the Software (other than to the limited
extent permitted by law);
d. copy or redistribute any components of the Software that are
not listed in the table of Redistributable Components;
e. publish, rent, lease, sell, export, import, or lend the
Software;
f. represent in any way that it is selling the Software itself
or any license to use the Software, nor refer to Codeplay or
ComputeCpp within its marketing materials, without the
express prior written permission of Codeplay.
4. Support. Codeplay does not provide any guarantees of support for
the Software to the user. Codeplay will use reasonable endeavours
to respond to users' support requests, for the most recent
release only, via the community support website at https://
computecpp.codeplay.com.
5. Intellectual Property. The Software is owned by Codeplay or its
licensors, and is protected by the copyright laws of the United
Kingdom and other countries and international treaty provisions.
Codeplay (and/or its licensors, as the case may be) retains all
copyrights, trade secrets and other proprietary rights in the
Software, including the rights to make and license the use of all
copies. To the extent that any patents owned by Codeplay or its
licensors relate to any component of the Software, the licence
granted to the user in accordance with this Agreement allows for
the lawful use of such patents but only for the purposes of this
Agreement and not further or otherwise. Therefore, the user may
make no copies of the Software, or the written materials that
accompany the Software, or reproduce it in any way, except as set
forth above.
6. Terms. This Agreement is effective until terminated. Codeplay or
the user may terminate it immediately at any time. Any violation
of the terms of this Agreement by the user will result in
immediate termination by Codeplay. Upon termination, the user
must return or destroy the Software and accompanying materials
and notify Codeplay of its actions by email to info@codeplay.com.
7. NO WARRANTIES. Codeplay expressly disclaims any warranty for the
Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
AND NON-INFRINGEMENT. IN NO EVENT SHALL CODEPLAY BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, DELICT OR TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. In particular, Codeplay provides no guarantees of
application performance on the target hardware.
8. General. The invalidity of any portion or provision of this
Agreement shall not affect any other portions or provisions. This
Agreement shall be governed by the laws of Scotland. This
Agreement is the complete and exclusive agreement between the
user and Codeplay regarding the Software, and it supersedes any
prior agreement, oral or written, and any other communication
between the user and Codeplay relating to the subject matter of
the Agreement. Any amendment or modification of this Agreement
must be in writing and signed by both parties. If the user does
not agree to the terms of this Agreement, the user must not
install or use the Software.
9. Third Party Licenses. The following licenses are for third-party
components included in the software.

a. License for Clang/LLVM compiler technology components:

==============================================================================

LLVM Release License

==============================================================================

University of Illinois/NCSA

Open Source License

Copyright (c) 2007-2014 University of Illinois at Urbana-Champaign.

All rights reserved.

Developed by:

LLVM Team

University of Illinois at Urbana-Champaign

http://llvm.org

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.

* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.

==============================================================================

b. License for OpenBSD regex components:

$OpenBSD: COPYRIGHT,v 1.3 2003/06/02 20:18:36 millert Exp $
Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved.
This software is not subject to any license of the American Telephone
and Telegraph Company or of the Regents of the University of California.
Permission is granted to anyone to use this software for any purpose on
any computer system, and to alter it and redistribute it, subject
to the following restrictions:

1. The author is not responsible for the consequences of use of this
software, no matter how awful, even if they arise from flaws in it.

2. The origin of this software must not be misrepresented, either by
explicit claim or by omission. Since few users ever read sources,
credits must appear in the documentation.

3. Altered versions must be plainly marked as such, and must not be
misrepresented as being the original software. Since few users
ever read sources, credits must appear in the documentation.

4. This notice may not be removed or altered.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

/*-
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)COPYRIGHT8.1 (Berkeley) 3/16/94
*/

c. License for MD5 components:

/*
* This code is derived from (original license follows):
*
* This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
* MD5 Message-Digest Algorithm (RFC 1321).
*
* Homepage:
* http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
*
* Author:
* Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
*
* This software was written by Alexander Peslyak in 2001. No copyright is
* claimed, and the software is hereby placed in the public domain.
* In case this attempt to disclaim copyright and place the software in the
* public domain is deemed null and void, then the software is
* Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
* general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* There's ABSOLUTELY NO WARRANTY, express or implied.
*
* (This is a heavily cut-down "BSD license".)
*
* This differs from Colin Plumb's older public domain implementation in that
* no exactly 32-bit integer data type is required (any 32-bit or wider
* unsigned integer data type will do), there's no compile-time endianness
* configuration, and the function prototypes match OpenSSL's. No code from
* Colin Plumb's implementation has been reused; this comment merely compares
* the properties of the two independent implementations.
*
* The primary goals of this implementation are portability and ease of use.
* It is meant to be fast, but not as fast as possible. Some known
* optimizations are not included to reduce source code size and avoid
* compile-time configuration.
*/

d. License for LLVM ARM Target components:

ARM Limited

Software Grant License Agreement ("Agreement")

Except for the license granted herein to you, ARM Limited ("ARM") reserves all
right, title, and interest in and to the Software (defined below).

Definition

"Software" means the code and documentation as well as any original work of
authorship, including any modifications or additions to an existing work, that
is intentionally submitted by ARM to llvm.org (http://llvm.org) ("LLVM") for
inclusion in, or documentation of, any of the products owned or managed by LLVM
(the "Work"). For the purposes of this definition, "submitted" means any form of
electronic, verbal, or written communication sent to LLVM or its
representatives, including but not limited to communication on electronic
mailing lists, source code control systems, and issue tracking systems that are
managed by, or on behalf of, LLVM for the purpose of discussing and improving
the Work, but excluding communication that is conspicuously marked otherwise.

1. Grant of Copyright License. Subject to the terms and conditions of this
Agreement, ARM hereby grants to you and to recipients of the Software
distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable copyright license to reproduce, prepare derivative
works of, publicly display, publicly perform, sublicense, and distribute the
Software and such derivative works.

2. Grant of Patent License. Subject to the terms and conditions of this
Agreement, ARM hereby grants you and to recipients of the Software
distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge,
royalty-free, irrevocable (except as stated in this section) patent license
to make, have made, use, offer to sell, sell, import, and otherwise transfer
the Work, where such license applies only to those patent claims licensable
by ARM that are necessarily infringed by ARM's Software alone or by
combination of the Software with the Work to which such Software was
submitted. If any entity institutes patent litigation against ARM or any
other entity (including a cross-claim or counterclaim in a lawsuit) alleging
that ARM's Software, or the Work to which ARM has contributed constitutes
direct or contributory patent infringement, then any patent licenses granted
to that entity under this Agreement for the Software or Work shall terminate
as of the date such litigation is filed.

Unless required by applicable law or agreed to in writing, the software is
provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied, including, without limitation, any warranties or
conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE.

@mattgodbolt
Copy link
Member Author

Cursory glance, I think we're ok. Will chat with a tame lawyer.

@mattgodbolt
Copy link
Member Author

Tried a quick local install, didn't instill much confidence :)

/t/ComputeCpp-CE-1.1.0-Ubuntu-16.04-x86_64 $ bin/compute++
bin/compute++: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory

Presumably I'm a few apt-get installs from it working. But no mention in any README that I found...

@mattgodbolt
Copy link
Member Author

Indeed:
$ sudo apt install libtinfo5

@janwilmans
Copy link

good, that that works, @TartanLlama or @mmha is it usefull or even possible to show SPIR-V assembly output ?

@mmha
Copy link

mmha commented Apr 5, 2019

Hey @janwilmans,

I have ComputeCpp working with a local Compiler Explorer instance. Showing the SPIR-V assembly works out of the box, all that needs to be passed to the compiler is -I <ComputeCpp Prefix>/include and then -sycl -sycl-target spirv[32|64] (or one of the other backends) if you want to see the device code in Compiler Explorer (which adds -S by itself). I personally only added the include path and enter -sycl manually to easily switch between different backends and host/device, but for godbolt.org you can probably add the device targets as separate "compilers" in the combobox.

I should also add that you get much more readable and LLVM-like SPIR-V assembly by disassembling the binary SPIR-V module with spirv-dis from KhronosGroup/SPIRV-Tools instead of using -S.

Thinking forward, it may be a benefitial for all the heterogeneous compilers on CE (nvcc, ComputeCpp, clang + OpenMP, gcc + OpenMP/OpenACC, icc + OpenMP) to be able to select both host and device targets separately instead of grouping them by host architecture only. In fact, gcc offloading works by having two compilers installed. What do you think @mattgodbolt?

@mmha
Copy link

mmha commented Apr 5, 2019

Oh another thing, I just saw the link to the OpenCL headers in the first post. If you want to add OpenCL as a library in CE, it would also make sense to add the OpenCL ICD Loader so the code can be linked without undefined references as well.

Another cool library to have on CE would be SYCL Parallel STL, but we can open a separate issue for this and the other libraries.

@janwilmans
Copy link

As always morris is three steps ahead of me ;) good stuff, however, I'm not sure about the ICD Loader, I thought code on compiler explorer is not linked at all?

@mmha
Copy link

mmha commented Apr 5, 2019

Code can optionally be linked and disassembled when you click on the 11010 button right under the compiler selection combo box.

@janwilmans
Copy link

Oh, is that what that does.... thanks.

@AbrilRBS AbrilRBS added the request Request for something label Jun 13, 2019
@rolandschulz
Copy link

rolandschulz commented Jun 20, 2019

It would be nice if it was possible to add not only the CodePlay compiler but also the Intel initiated open-source compiler (https://lists.llvm.org/pipermail/cfe-dev/2019-January/060811.html https://github.com/intel/llvm/tree/sycl). BTW: There are also other SYCL implementations (for an overview see e.g. https://raw.githubusercontent.com/illuhad/hipSYCL/master/doc/img/sycl-targets.png).

@mattgodbolt
Copy link
Member Author

Thinking forward, it may be a benefitial for all the heterogeneous compilers on CE (nvcc, ComputeCpp, clang + OpenMP, gcc + OpenMP/OpenACC, icc + OpenMP) to be able to select both host and device targets separately instead of grouping them by host architecture only. In fact, gcc offloading works by having two compilers installed. What do you think @mattgodbolt?

I don't really know...I've not used any of these technologies so don't have a strong opinion. Sounds like a bit of UI work to have two separate compilers to pick?

@partouf
Copy link
Contributor

partouf commented Sep 3, 2022

As per #4019 I think we can close this issue (and if not I'll refer to the discussion in #2244)

@partouf partouf closed this as completed Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-compilers request Request for something
Projects
Status: Done
Development

No branches or pull requests

6 participants