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

Getting Started Guide: Linux #17

Merged
merged 11 commits into from Mar 31, 2022
Merged

Conversation

MathiasMagnus
Copy link
Contributor

This is a getting started guide focusing on Ubuntu, the distro of choice for Linux.

@Kerilk
Copy link

Kerilk commented Feb 15, 2022

I just noticed while reviewing the CI logs, the new file's extension is repeated.

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice guide, but I wonder if it is a little too complicated for a "getting started" guide.

An OpenCL fan has been contributing basic "setup" docs to my SimpleOpenCLSamples repo for a while now. Here's an example for Ubuntu 18.04:

https://github.com/bashbaug/SimpleOpenCLSamples/blob/master/docs/env/ubuntu/18.04.md

It heavily leverages the Ubuntu packages for OpenCL headers / libs / etc. These are admittedly a bit old, but they have the advantage of being super easy for novice users to install and are usually sufficient to build and run "my first OpenCL application".

How do you feel about having one "getting started" doc that uses OS packages to get up and running as quickly and easily as possible, and a different "getting start" doc like this one that generates an up-to-date environment built on the SDK? They could even be two different sections of the same doc, if desired.

- The C and optionally the C++ headers
- An Installable Client Driver (ICD) Loader
- Shared objects library (libOpenCL.so)
- Export library (libOpenCL.a)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Linux a separate export library is not needed and the same libOpenCL.so is used for both purposes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that was a mistake from our part. Fixed.

Comment on lines 39 to 45
Another popular choice is the usage of `Clang` compiler, based on intermediate representation of the C-like languages on `LLVM` (originally Low Level Virtual Machine). To use it open your favorite shell in your favorite terminal and run:

``` bash
sudo apt install clang -y
```

This will install `Clang 10` and `LLVM 10`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd consider removing this section (and any other mention of Clang) entirely. While I'm a fan of Clang, I think this is unnecessary to create a "minimal and productive environment" and as far as I can tell no part of this guide uses Clang.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

If you do not have CMake installed yet, we'll install it, as it's the primary supported build system, and it will make our builds much simpler. Open your favorite shell in your favorite terminal and run:

``` bash
sudo apt install cmake ninja-build -y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, no part of this guide uses ninja.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

MathiasMagnus and others added 2 commits March 31, 2022 15:15
Co-authored-by: Chris Eich <ceich62@gmail.com>
@MathiasMagnus
Copy link
Contributor Author

@bashbaug I added dropdown menus to the various ways of obtaining the headers/lib and how to build on the command-line in each case, but left uncollapsed by default only the the simplest way: APT. I left GitHub and Vcpkg there for those interested in those ways as well, but they're somewhat "out of sight, out of mind" and don't clutter the straightforward way.

Does that seem like something acceptable?

I also went ahead and removed the VS Code part because it was way too brief compared to the depth, so I will write a separate document which we can link from the end of both the Windows and Linux guide some other time.

Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement! Thank you for all of your work to improve the SDK!

chapters/getting_started_linux.md Outdated Show resolved Hide resolved
chapters/getting_started_linux.md Outdated Show resolved Hide resolved
chapters/getting_started_linux.md Outdated Show resolved Hide resolved
MathiasMagnus and others added 3 commits March 31, 2022 18:55
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
Co-authored-by: Ben Ashbaugh <ben.ashbaugh@intel.com>
@MathiasMagnus MathiasMagnus merged commit 8ccaf38 into KhronosGroup:main Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants