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

Task01 Роман Гостило HSE #60

Closed
wants to merge 7 commits into from

Conversation

unicoooorn
Copy link

@unicoooorn unicoooorn commented Sep 22, 2024

Локальный вывод

Device: Apple M3 Max
Data generated for n=100000000!
Kernel average time: 0.0047965+-0.000246055 s
GFlops: 20.8485
VRAM bandwidth: 233.001 GB/s
Result data transfer time: 0.0119132+-0.000426648 s
VRAM -> RAM bandwidth: 31.2704 GB/s

Вывод Github CI

Device: AMD EPYC 7763 64-Core Processor                
Data generated for n=100000000!
Kernel average time: 0.0322168+-0.000275012 s
GFlops: 3.10397
VRAM bandwidth: 34.6895 GB/s
Result data transfer time: 0.0178947+-0.00023741 s
VRAM -> RAM bandwidth: 20.8179 GB/s

src/main.cpp Outdated
@@ -145,7 +145,7 @@ int main() {
return err;
}

cl_mem cs_buf = clCreateBuffer(ctx, CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR, sizeof(float) * n, cs.data(), &err);
Copy link
Collaborator

Choose a reason for hiding this comment

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

а почему убрали USE_HOST_PTR?

Copy link
Author

Choose a reason for hiding this comment

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

мы же хотим выгрузить только после выполнения кёрнела всё из VRAM в RAM, поэтому я не нашел смысла в USE_HOST_PTR

Copy link
Collaborator

Choose a reason for hiding this comment

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

В случае когда кернел исполняется на процессоре или на встройке, vram и ram это одно и то же, и имеет смысл лишний раз не копировать

@simiyutin
Copy link
Collaborator

Все хорошо, задача зачтена, 5/5 баллов 👍

@simiyutin simiyutin closed this Sep 28, 2024
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.

2 participants