-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Individual test cases and benchmarks for cuda
- Loading branch information
Showing
15 changed files
with
775 additions
and
159 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
#ifndef __TASK_H__ | ||
#define __TASK_H__ | ||
#ifndef __POPCORN_TASK_H__ | ||
#define __POPCORN_TASK_H__ | ||
|
||
#include <vector> | ||
#include <array> | ||
|
||
#define N_SIZES 10 | ||
const int Ns[N_SIZES] = {128, 256, 512, 1024, 2048, | ||
4096, 8192, 16384, 32768, 65536}; | ||
|
||
using input_t = std::array<std::vector<float>, N_SIZES>; | ||
using input_t = std::vector<float>; | ||
using output_t = input_t; | ||
|
||
constexpr std::array<const char*, 2> ArgumentNames = {"seed", "size"}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
import pprint | ||
import sys | ||
from pathlib import Path | ||
|
||
sys.path.append("src/discord-cluster-manager") | ||
|
||
from leaderboard_eval import cu_eval | ||
from run_eval import run_cuda_script | ||
|
||
ref = Path("examples/identity_cuda/reference.cuh") | ||
sub = Path("examples/identity_cuda/submission.cuh") | ||
sub = Path("examples/identity_cuda/submission.cu") | ||
util = Path("examples/identity_cuda/utils.h") | ||
task = Path("examples/identity_cuda/task.h") | ||
|
||
cout, score = run_cuda_script( | ||
{"eval.cu": cu_eval}, | ||
{"reference.cuh": ref.read_text(), "submission.cuh": sub.read_text()}, | ||
result = run_cuda_script( | ||
{ | ||
"eval.cu": Path("examples/identity_cuda/eval.cu").read_text(), | ||
"submission.cu": sub.read_text(), | ||
}, | ||
{"reference.cuh": ref.read_text(), "utils.h": util.read_text(), "task.h": task.read_text()}, | ||
arch=None, | ||
tests="size: 128; seed: 45\nsize: 512; seed: 123", | ||
mode="test", | ||
) | ||
print(cout) | ||
print(score) | ||
exit(0 if score > 0 else 1) | ||
|
||
pprint.pprint(result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.