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

First version with working meson builder configuration, with tests! #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AtilaSaraiva
Copy link

Hello again! I made the working version, I still have some things to do, but all the tests are working. The most troublesome thing is that I had to write a small python script (for portability) to copy the *.cl files to another directory in memory, and then create the *.cl.o files from there with ld, each at their own folder, which is deleted afterwards. This is not ideal but is working.
I'd much rather have the focal library to be able to handle any symbol name.

Either way I will add how to use it on the docs and I thinking about using a simple shell script instead of python, just need to study it a little bit.

@AtilaSaraiva AtilaSaraiva deleted the meson branch October 29, 2021 22:22
@AtilaSaraiva AtilaSaraiva restored the meson branch October 29, 2021 22:22
@AtilaSaraiva
Copy link
Author

Oh I closed by accident haha

@codecov-commenter
Copy link

Codecov Report

Merging #15 (98277f4) into master (fee5d7a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #15   +/-   ##
=======================================
  Coverage   71.89%   71.89%           
=======================================
  Files          10       10           
  Lines        1327     1327           
=======================================
  Hits          954      954           
  Misses        373      373           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fee5d7a...98277f4. Read the comment docs.

@LKedward
Copy link
Owner

LKedward commented Nov 1, 2021

Many thanks @AtilaSaraiva , looks good to me! Yes you are right about the *.cl object files, it is a bit awkward for the build process. I agree it would be better for Focal to be able to handle any symbol name; this might be possible, I'll have a think about it.
I think I might simplify the tests anyway so that the kernel sources are included in the Fortran files as strings since the kernels are quite simple and only a few tests actually use them anyway.

Is this PR ready to merge now or is there more work to do on it? Thanks again!

@AtilaSaraiva
Copy link
Author

It is my pleasure! I'd like to check for mistakes before the merge, I'll do it asap.
I've been thinking about the problem with .cl files and I stumbled upon the clBlas repo. They write their kernels on normal c files, and use a python program to convert to a header file with a string variable containing the kernel, and compile the kernel and extract its binary, or at least this is what I managed to understand. We could do something like that!

Additionally, I'd like to ask a question, is it possible to use clBlas or other OpenCL libraries from fortran using focal? I thought a simple interface would do it but I'm not so sure, gotta test.

Either way, I still have to update the docs to reflect the meson builder addition. I'll try to create some time this week to do that. It is in another repository right?

@LKedward
Copy link
Owner

LKedward commented Nov 1, 2021

Awesome, sounds good! Yes that seems like a possible alternative.
It should be possible to use other OpenCL libraries from Focal, but I haven't tried this yet. I'd quite like to try clBlas with Focal.
Yes the documentation is in https://github.com/lkedward/focal-docs.
Cheers, no rush - let me know when you're ready to merge.

@AtilaSaraiva
Copy link
Author

@LKedward pls do forgive me for my absence, the last few months have been crazy. I added support for generating pkg-config configurations for the library, making it easier for people with different build systems to easily import focal. This will also help me when I ultimately package this for Nix.

Now the meson configuration is looking good IMHO!

@AtilaSaraiva
Copy link
Author

Oh I remembered, the .mod files need a special script to be installed, gonna work on that.

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

3 participants