dsh-eval-guard 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ISSUES.md +235 -0
- package/README.md +46 -18
- package/assets/neural-cifar/workspace.zip +0 -0
- package/assets/neural-cpp/workspace.zip +0 -0
- package/assets/neural-fp32/workspace.zip +0 -0
- package/assets/neural-pendulum/SPEC.md +39 -32
- package/assets/neural-pendulum/TASK.md +137 -32
- package/assets/neural-pendulum/workspace.zip +0 -0
- package/eval/README.md +19 -9
- package/eval/__pycache__/bomberman.cpython-310.pyc +0 -0
- package/eval/__pycache__/commit0.cpython-310.pyc +0 -0
- package/eval/__pycache__/common.cpython-310.pyc +0 -0
- package/eval/__pycache__/ctf.cpython-310.pyc +0 -0
- package/eval/__pycache__/featurebench.cpython-310.pyc +0 -0
- package/eval/__pycache__/land.cpython-310.pyc +0 -0
- package/eval/__pycache__/neural-cifar.cpython-310.pyc +0 -0
- package/eval/__pycache__/neural-cpp.cpython-310.pyc +0 -0
- package/eval/__pycache__/neural-fp32.cpython-310.pyc +0 -0
- package/eval/__pycache__/neural-pendulum.cpython-310.pyc +0 -0
- package/eval/__pycache__/swe-bench-pro.cpython-310.pyc +0 -0
- package/eval/__pycache__/tank.cpython-310.pyc +0 -0
- package/eval/__pycache__/warehouse.cpython-310.pyc +0 -0
- package/eval/bomberman.py +5 -3
- package/eval/commit0.py +10 -3
- package/eval/common.py +169 -5
- package/eval/ctf.py +4 -2
- package/eval/featurebench.py +12 -8
- package/eval/land.py +4 -2
- package/eval/legacy/__pycache__/bomberman.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/commit0.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/ctf.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/featurebench.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/land.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/swe_bench_pro.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/tank.cpython-310.pyc +0 -0
- package/eval/legacy/__pycache__/warehouse.cpython-310.pyc +0 -0
- package/eval/legacy/bomberman.py +5 -2
- package/eval/legacy/ctf.py +5 -2
- package/eval/legacy/featurebench.py +55 -15
- package/eval/legacy/land.py +6 -3
- package/eval/legacy/swe_bench_pro.py +57 -16
- package/eval/legacy/tank.py +2 -2
- package/eval/legacy/warehouse.py +4 -4
- package/eval/neural-cpp.py +9 -6
- package/eval/neural-fp32.py +17 -5
- package/eval/swe-bench-pro.py +11 -7
- package/eval/tank.py +11 -2
- package/eval/warehouse.py +17 -1
- package/lib/client/index.js +56 -29
- package/lib/client/index.js.map +1 -1
- package/lib/index.js +878 -297
- package/native/dsh-eval-supervisor +0 -0
- package/native/supervisor.c +190 -26
- package/neural-cifar-eval/README.md +5 -0
- package/neural-cifar-eval/__pycache__/cifar_cache.cpython-310.pyc +0 -0
- package/neural-cifar-eval/__pycache__/common.cpython-310.pyc +0 -0
- package/neural-cifar-eval/__pycache__/fetch_cifar.cpython-310.pyc +0 -0
- package/neural-cifar-eval/__pycache__/ops_eval.cpython-310.pyc +0 -0
- package/neural-cifar-eval/__pycache__/run_eval.cpython-310.pyc +0 -0
- package/neural-cifar-eval/common.py +13 -0
- package/neural-cifar-eval/ops_eval.py +17 -5
- package/neural-cifar-eval/run_eval.py +42 -32
- package/neural-pendulum-eval/README.md +62 -0
- package/neural-pendulum-eval/__pycache__/ops_eval.cpython-310.pyc +0 -0
- package/neural-pendulum-eval/__pycache__/run_eval.cpython-310.pyc +0 -0
- package/neural-pendulum-eval/ops_eval.py +603 -0
- package/neural-pendulum-eval/run_eval.py +218 -137
- package/package.json +7 -11
- package/assets/neural-pendulum/hidden/test_infra.cpp +0 -631
- package/assets/neural-pendulum/include/nn/nn.hpp +0 -88
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// Neural-CPP public interface. Implement everything declared here.
|
|
2
|
-
#pragma once
|
|
3
|
-
|
|
4
|
-
#include <cstddef>
|
|
5
|
-
#include <cstdint>
|
|
6
|
-
#include <memory>
|
|
7
|
-
#include <string>
|
|
8
|
-
#include <vector>
|
|
9
|
-
|
|
10
|
-
namespace nn {
|
|
11
|
-
|
|
12
|
-
using Shape = std::vector<int64_t>;
|
|
13
|
-
|
|
14
|
-
enum class DType : uint8_t {
|
|
15
|
-
F32, F64,
|
|
16
|
-
I8, I16, I32, I64, I128,
|
|
17
|
-
U8, U16, U32, U64, U128,
|
|
18
|
-
BF16, FP8_E5M2, MXFP4
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
enum class Rounding : uint8_t { NearestEven, TowardZero, Stochastic };
|
|
22
|
-
enum class ThreadMode : uint8_t { Development, Evaluation };
|
|
23
|
-
|
|
24
|
-
constexpr int kDevMaxThreads = 4;
|
|
25
|
-
|
|
26
|
-
std::size_t dtype_size(DType dtype);
|
|
27
|
-
const char* dtype_name(DType dtype);
|
|
28
|
-
|
|
29
|
-
class Tensor {
|
|
30
|
-
public:
|
|
31
|
-
Tensor();
|
|
32
|
-
Tensor(const Tensor&) = default;
|
|
33
|
-
Tensor(Tensor&&) noexcept = default;
|
|
34
|
-
Tensor& operator=(const Tensor&) = default;
|
|
35
|
-
Tensor& operator=(Tensor&&) noexcept = default;
|
|
36
|
-
~Tensor();
|
|
37
|
-
|
|
38
|
-
static Tensor empty(const Shape& shape, DType dtype);
|
|
39
|
-
static Tensor from_data(const void* data, const Shape& shape, DType dtype);
|
|
40
|
-
|
|
41
|
-
const Shape& shape() const;
|
|
42
|
-
DType dtype() const;
|
|
43
|
-
int64_t ndim() const;
|
|
44
|
-
int64_t numel() const;
|
|
45
|
-
bool is_contiguous() const;
|
|
46
|
-
|
|
47
|
-
const void* data() const;
|
|
48
|
-
void* data();
|
|
49
|
-
|
|
50
|
-
Tensor to(DType dst, Rounding mode = Rounding::NearestEven, uint64_t seed = 0) const;
|
|
51
|
-
Tensor view(const Shape& shape) const;
|
|
52
|
-
Tensor reshape(const Shape& shape) const;
|
|
53
|
-
Tensor permute(const std::vector<int>& dims) const;
|
|
54
|
-
Tensor slice(int dim, int64_t start, int64_t stop, int64_t step = 1) const;
|
|
55
|
-
Tensor contiguous() const;
|
|
56
|
-
Tensor clone() const;
|
|
57
|
-
|
|
58
|
-
void set_requires_grad(bool value);
|
|
59
|
-
bool requires_grad() const;
|
|
60
|
-
Tensor grad() const;
|
|
61
|
-
void backward();
|
|
62
|
-
|
|
63
|
-
// Implementation detail. Exposed so the library implementer can define
|
|
64
|
-
// free functions without the header becoming a barrier.
|
|
65
|
-
struct Impl;
|
|
66
|
-
std::shared_ptr<Impl> impl_;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
Tensor add(const Tensor& a, const Tensor& b);
|
|
70
|
-
Tensor sub(const Tensor& a, const Tensor& b);
|
|
71
|
-
Tensor mul(const Tensor& a, const Tensor& b);
|
|
72
|
-
Tensor div(const Tensor& a, const Tensor& b);
|
|
73
|
-
Tensor sum(const Tensor& a, int dim = -1);
|
|
74
|
-
Tensor mean(const Tensor& a, int dim = -1);
|
|
75
|
-
|
|
76
|
-
Tensor matmul(const Tensor& a, const Tensor& b);
|
|
77
|
-
Tensor matmul_nd(const Tensor& a, const Tensor& b,
|
|
78
|
-
const std::vector<int>& a_batch_dims,
|
|
79
|
-
const std::vector<int>& b_batch_dims,
|
|
80
|
-
const std::vector<int>& a_matrix_dims,
|
|
81
|
-
const std::vector<int>& b_matrix_dims);
|
|
82
|
-
|
|
83
|
-
void set_thread_mode(ThreadMode mode);
|
|
84
|
-
void set_num_threads(int n);
|
|
85
|
-
int num_threads();
|
|
86
|
-
int active_workers();
|
|
87
|
-
|
|
88
|
-
} // namespace nn
|