zhujiace commited on
Commit
4a3ee39
·
1 Parent(s): 7be128d
Files changed (2) hide show
  1. tool/sample.txt +4 -1
  2. tool/testv3.so +1 -1
tool/sample.txt CHANGED
@@ -2,6 +2,7 @@ Given the following task description:
2
  [input.txt]
3
  Write a complete CUDA program (.cu file) that solves this task using a basic and correct algorithm. The implementation should include a kernel function and the main function that tests it.
4
  There are 5 sets of binary input data. The main function should test all five datasets. If all of them pass, the program should print "T", otherwise print "F". The output must strictly be either "T" or "F". Do not write any extra output.
 
5
  Here is a reference style for the structure of the .cu file:
6
  ```cu
7
  #include <iostream>
@@ -113,7 +114,9 @@ int main() {
113
  return 0;
114
  }
115
  ```
116
- You also need to write the Python script gen_test_data.py to generate the test binary files. Use the following as a style reference. Make sure all binary files are stored under a folder named data/. Avoid generating extremely large data. Suggested sizes are shown below:
 
 
117
  ```py
118
  import numpy as np
119
  import os
 
2
  [input.txt]
3
  Write a complete CUDA program (.cu file) that solves this task using a basic and correct algorithm. The implementation should include a kernel function and the main function that tests it.
4
  There are 5 sets of binary input data. The main function should test all five datasets. If all of them pass, the program should print "T", otherwise print "F". The output must strictly be either "T" or "F". Do not write any extra output.
5
+ When comparing the output of the CUDA program with the reference, you may increase the error tolerance in `compare_scalar()` for numerically unstable or ill-conditioned tasks. For example, tasks such as **matrix inversion** may involve large numerical errors due to floating-point instability, and thus require a larger tolerance threshold.
6
  Here is a reference style for the structure of the .cu file:
7
  ```cu
8
  #include <iostream>
 
114
  return 0;
115
  }
116
  ```
117
+ You also need to write the Python script gen_test_data.py to generate the test binary files.
118
+ When generating test data, make sure it is feasible for the target task. For example, in a matrix inversion task, the input matrix must be invertible (i.e., non-singular) to ensure correct reference generation and program behavior.
119
+ Use the following as a style reference. Make sure all binary files are stored under a folder named data/. Avoid generating extremely large data. Suggested sizes are shown below:
120
  ```py
121
  import numpy as np
122
  import os
tool/testv3.so CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9911ef353f67e6f1bd1ea5c7fea5e9bea863983dfbe8945069079343a25a4be3
3
  size 487120
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:532ed0f05a260ea9260928e1ee4cfaee08d364dced2b18aec97a8e2956a59c1e
3
  size 487120