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

Create SimpleNonlinearSolve_Kernel_Tutorial.md #423

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Spinachboul
Copy link

No description provided.

- AMDGPU.jl (for AMD GPUs)

## Writing the Kernel
Define a kernel using <b>'@kernel'</b> from <b>'KernelAbstractions.jl'</b> to solve a single initial condition.
Copy link
Member

Choose a reason for hiding this comment

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

Why not directly use the markdown syntax?

Copy link
Author

Choose a reason for hiding this comment

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

Changed to md syntax

## Writing the Kernel
Define a kernel using <b>'@kernel'</b> from <b>'KernelAbstractions.jl'</b> to solve a single initial condition.

```@example kenel
Copy link
Member

Choose a reason for hiding this comment

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

To ensure the consistency of example environment, here should be kernel

Copy link
Author

Choose a reason for hiding this comment

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

Yeah made the changes

@Spinachboul
Copy link
Author

Is any change required in the tutorial content??
@ErikQQY

@Spinachboul Spinachboul requested a review from ErikQQY May 3, 2024 17:39

### Prerequisites
Ensure the following packages are installed:
- Julia (v1.6 or later)
Copy link
Member

Choose a reason for hiding this comment

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

1.10

Copy link
Author

Choose a reason for hiding this comment

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

Yeah changed the version

Comment on lines 72 to 79
# Threaded CPU
vectorized_solve(prob, SimpleNewtonRaphson(); backend = CPU())

# AMD ROCM GPU
vectorized_solve(prob, SimpleNewtonRaphson(); backend = ROCBackend())

# NVIDIA CUDA GPU
vectorized_solve(prob, SimpleNewtonRaphson(); backend = CUDABackend())
Copy link
Member

Choose a reason for hiding this comment

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

Comment out the ones that can't be run on the server

@avik-pal
Copy link
Member

avik-pal commented May 3, 2024

Use a filename that is consistent with the other files

@@ -0,0 +1,83 @@
# Using SimpleNonlinearSolve with KernelAbstractions.jl
Copy link
Member

Choose a reason for hiding this comment

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

Using Nonlinear Solvers inside GPU Kernels

@Spinachboul
Copy link
Author

Use a filename that is consistent with the other files

Changed the name you suggested

Comment on lines 72 to 79
# Threaded CPU
# vectorized_solve(prob, SimpleNewtonRaphson(); backend = CPU())

# AMD ROCM GPU
# vectorized_solve(prob, SimpleNewtonRaphson(); backend = ROCBackend())

# NVIDIA CUDA GPU
# vectorized_solve(prob, SimpleNewtonRaphson(); backend = CUDABackend())
Copy link
Member

Choose a reason for hiding this comment

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

dont' comment everything out 😓

Copy link

codecov bot commented May 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.84%. Comparing base (9da188b) to head (b3443ff).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
- Coverage   86.30%   79.84%   -6.46%     
==========================================
  Files          47       47              
  Lines        2913     2908       -5     
==========================================
- Hits         2514     2322     -192     
- Misses        399      586     +187     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@avik-pal
Copy link
Member

avik-pal commented May 6, 2024

Doc build is failing

@Spinachboul
Copy link
Author

Is there any syntax issue in the documentation. Ideally it shouldn't happen

@avik-pal
Copy link
Member

avik-pal commented May 6, 2024

You can check the failure https://github.com/SciML/NonlinearSolve.jl/actions/runs/8947164779/job/24579133735?pr=423. In any case, you should be running the code locally before pushing it.

@Spinachboul
Copy link
Author

You can check the failure https://github.com/SciML/NonlinearSolve.jl/actions/runs/8947164779/job/24579133735?pr=423. In any case, you should be running the code locally before pushing it.

Sure! Some packages are not installed in the dev while running the code. Also the backend servers are not defined. I'll make the changes soon.

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