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

Adding GPU support to VTL #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions backends/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# All Backends in VTL Engine

VTL Engine supports the following backends:
- Cuda
- OpenCL
- OpenMP
- Vulkan
Comment on lines +4 to +7
Copy link

Choose a reason for hiding this comment

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

Fix unordered list indentation.

The unordered list items are indented incorrectly. The correct indentation should be 2 spaces.

-   - Cuda
-   - OpenCL
-   - OpenMP
-   - Vulkan
+  - Cuda
+  - OpenCL
+  - OpenMP
+  - Vulkan
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Cuda
- OpenCL
- OpenMP
- Vulkan
- Cuda
- OpenCL
- OpenMP
- Vulkan
Tools
Markdownlint

4-4: Expected: 0; Actual: 3
Unordered list indentation

(MD007, ul-indent)


5-5: Expected: 0; Actual: 3
Unordered list indentation

(MD007, ul-indent)


6-6: Expected: 0; Actual: 3
Unordered list indentation

(MD007, ul-indent)


7-7: Expected: 0; Actual: 3
Unordered list indentation

(MD007, ul-indent)


## Cuda
First install cuda toolkit: https://developer.nvidia.com/cuda-downloads
### usage:
Comment on lines +10 to +11
Copy link

Choose a reason for hiding this comment

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

Fix heading punctuation and format URL.

The heading should not have trailing punctuation, and the URL should be formatted as a proper link.

-  First install cuda toolkit: https://developer.nvidia.com/cuda-downloads
+  First install the [CUDA toolkit](https://developer.nvidia.com/cuda-downloads)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
First install cuda toolkit: https://developer.nvidia.com/cuda-downloads
### usage:
First install the [CUDA toolkit](https://developer.nvidia.com/cuda-downloads)
### usage
Tools
Markdownlint

11-11: null
Headings must start at the beginning of the line

(MD023, heading-start-left)


11-11: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


10-10: null
Bare URL used

(MD034, no-bare-urls)

```vlang
import vtl
vtl_tensor := vtl.from_array([1.0, 2, 3, 4], [2, 2])!
vtl_tensor.cuda()
println('My device: ${vtl_tensor.device}')

```

## OpenCL
First install opencl toolkit: https://www.khronos.org/opencl/
### usage:
Comment on lines +21 to +22
Copy link

Choose a reason for hiding this comment

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

Fix heading punctuation and format URL.

The heading should not have trailing punctuation, and the URL should be formatted as a proper link.

-  First install opencl toolkit: https://www.khronos.org/opencl/
+  First install the [OpenCL toolkit](https://www.khronos.org/opencl/)

Committable suggestion was skipped due to low confidence.

Tools
Markdownlint

22-22: null
Headings must start at the beginning of the line

(MD023, heading-start-left)


22-22: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)


21-21: null
Bare URL used

(MD034, no-bare-urls)

```vlang
import vtl
vtl_tensor := vtl.from_array([1.0, 2, 3, 4], [2, 2])!
vtl_tensor.opencl()
Copy link
Member

Choose a reason for hiding this comment

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

no need to have an extra backend for opencl. We must use VCL since it is the V official OpenCL wrapper

pub fn (t &Tensor[T]) vcl(params storage.VclStorageParams) !&VclTensor[T] {

we could have an alias function called opencl tho

println('My device: ${vtl_tensor.device}')

```

## OpenMP
### usage:
Copy link

Choose a reason for hiding this comment

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

Fix heading punctuation.

The heading should not have trailing punctuation.

-  ### usage:
+  ### usage
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### usage:
### usage
Tools
Markdownlint

32-32: null
Headings must start at the beginning of the line

(MD023, heading-start-left)


32-32: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

```vlang
import vtl
vtl_tensor := vtl.from_array([1.0, 2, 3, 4], [2, 2])!
vtl_tensor.openmp()
println('My device: ${vtl_tensor.device}')

```

## Vulkan
### usage:
Copy link

Choose a reason for hiding this comment

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

Fix heading punctuation.

The heading should not have trailing punctuation.

-  ### usage:
+  ### usage
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### usage:
### usage
Tools
Markdownlint

42-42: null
Headings must start at the beginning of the line

(MD023, heading-start-left)


42-42: Punctuation: ':'
Trailing punctuation in heading

(MD026, no-trailing-punctuation)

```vlang
import vtl
vtl_tensor := vtl.from_array([1.0, 2, 3, 4], [2, 2])!
vtl_tensor.vulkan()
println('My device: ${vtl_tensor.device}')

```
1 change: 1 addition & 0 deletions backends/cuda/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Cuda backend for VTL
1 change: 1 addition & 0 deletions backends/opencl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# OpenCL backend for VTL
1 change: 1 addition & 0 deletions backends/openmp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# OpenMP backend for VTL
1 change: 1 addition & 0 deletions backends/vulkan/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Vulkan backend for VTL
1 change: 1 addition & 0 deletions tools/Image/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Image module for VTL