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

Much Anticipated Camp Docs #158

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Much Anticipated Camp Docs #158

wants to merge 35 commits into from

Conversation

kab163
Copy link
Collaborator

@kab163 kab163 commented Nov 8, 2024

I am oh so tired of Camp having zero docs - let's change that!

Building upon Zoe's documentation...

See generated docs here: https://camp.readthedocs.io/en/kab163-long58-camp-docs/index.html

  • Figure out if Camp means "Compiler Agnostic MetaProgramming"

@kab163 kab163 changed the title Long Awaited Camp Docs Much Anticipated Camp Docs Nov 8, 2024
@artv3
Copy link
Member

artv3 commented Nov 8, 2024

Awesome!!!!

Copy link
Member

@trws trws left a comment

Choose a reason for hiding this comment

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

Huzzah! This is great, thanks for putting in the time and effort to put this together. I tried to do a full run through it, and aside from some either typos or minor things it looks great!

docs/sphinx/user_guide/feature/list.rst Outdated Show resolved Hide resolved
docs/sphinx/user_guide/feature/list.rst Outdated Show resolved Hide resolved
docs/sphinx/user_guide/feature/list.rst Outdated Show resolved Hide resolved
docs/sphinx/user_guide/feature/list.rst Outdated Show resolved Hide resolved
docs/sphinx/user_guide/feature/list.rst Outdated Show resolved Hide resolved
docs/sphinx/user_guide/feature/resource.rst Outdated Show resolved Hide resolved
docs/sphinx/user_guide/using_camp.rst Outdated Show resolved Hide resolved
@long58
Copy link
Collaborator

long58 commented Nov 9, 2024

I added a couple more pages that I had been working on, as well as fixed the issues in the pages that I wrote that @trws pointed out.

...
auto resource = camp::resources::Resource{resource_type{}}; // Create a (Generic) Camp resource
my_kernel<<<NUM_BLOCKS, THREADS_PER_BLOCK>>>(my_data); // Do some work on the device
resource.get_event().wait(); // Use the resource to synchronize the device after the kernel
Copy link
Member

@rhornung67 rhornung67 Nov 12, 2024

Choose a reason for hiding this comment

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

I don't believe this is not guaranteed to work because the kernel and the resource are not guaranteed to be associated with the same GPU stream.

To guarantee correctness, you would need to launch the kernel like this:

my_kernel<<<NUM_BLOCKS, THREADS_PER_BLOCK, 0, resource.get_stream()>>>(my_data);

The zero arg indicates the amount of shared memory to use.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I know what you mean, but technically you used 3 negatives in that first sentence :p

Copy link
Member

Choose a reason for hiding this comment

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

Sorry I was not clear. You will need to pass stream from the resource as the fourth arg in the <<<...>>> construct to guarantee that you will be waiting on the correct event as in the kernel launch syntax I wrote.

Choose a reason for hiding this comment

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

This file appears to be unused. blt_add_doxygen_target uses CMake's configure_file() to read Doxyfile.in, perform string substitution, and write Doxyfile in the build directory. (extern/blt/cmake/SetupDocs.cmake:30)

@trws
Copy link
Member

trws commented Nov 13, 2024

  • Figure out if Camp means "Compiler Agnostic MetaProgramming"

It does 😄

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.

7 participants