Skip to content

[OpenMP] Reduce the size of heap memory required by the test malloc_parallel.c #75885

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

Merged
merged 1 commit into from
Dec 20, 2023
Merged
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
8 changes: 4 additions & 4 deletions openmp/libomptarget/test/offloading/malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

int main() {
long unsigned *DP = 0;
int N = 128;
int Threads = 128;
int Teams = 440;
int N = 32;
int Threads = 64;
int Teams = 10;

// Allocate ~55MB on the device.
#pragma omp target map(from : DP)
Expand All @@ -31,7 +31,7 @@ int main() {
}
}

// CHECK: Sum: 203458478080
// CHECK: Sum: 6860800
printf("Sum: %li\n", s);
return 0;
}
8 changes: 4 additions & 4 deletions openmp/libomptarget/test/offloading/malloc_parallel.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

int main() {
long unsigned **DP = 0;
int N = 128;
int Threads = 128;
int Teams = 440;
int N = 32;
int Threads = 64;
int Teams = 10;

#pragma omp target map(from : DP)
DP = (long unsigned **)malloc(sizeof(long unsigned *) * Threads * Teams);
Expand All @@ -36,7 +36,7 @@ int main() {
}
}

// CHECK: Sum: 203458478080
// CHECK: Sum: 6860800
printf("Sum: %li\n", s);
return 0;
}