releaase 2.11 (#703)
This commit is contained in:
@@ -75,6 +75,7 @@ public:
|
||||
struct Conv2dProblem {
|
||||
|
||||
int64_t n, h, w, c, p, q, k, r, s;
|
||||
int64_t groups;
|
||||
int64_t pad_h, pad_w;
|
||||
int64_t stride_h, stride_w;
|
||||
int64_t dilation_h, dilation_w;
|
||||
@@ -114,7 +115,7 @@ public:
|
||||
cutlass::gemm::GemmCoord eq_gemm_size(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
case library::ConvKind::kFprop: return cutlass::gemm::GemmCoord(int(n * p * q), int(k), int(r * s * c));
|
||||
case library::ConvKind::kFprop: return cutlass::gemm::GemmCoord(int(n * p * q), int(k), int(r * s * c / groups));
|
||||
case library::ConvKind::kDgrad: return cutlass::gemm::GemmCoord(int(n * h * w), int(c), int(k * r * s));
|
||||
case library::ConvKind::kWgrad: return cutlass::gemm::GemmCoord(int(k), int(r * s * c), int(n * p * q));
|
||||
default : throw std::runtime_error("Invalid Conv Operator (fprop, dgrad, wgrad)");
|
||||
@@ -136,7 +137,7 @@ public:
|
||||
std::vector<int> extent_b(library::ConvKind const &conv_kind) const {
|
||||
|
||||
switch (conv_kind) {
|
||||
case library::ConvKind::kFprop: return {int(k), int(r), int(s), int(c)};
|
||||
case library::ConvKind::kFprop: return {int(k), int(r), int(s), int(c / groups)};
|
||||
case library::ConvKind::kDgrad: return {int(k), int(r), int(s), int(c)};
|
||||
case library::ConvKind::kWgrad: return {int(n), int(h), int(w), int(c)};
|
||||
default : throw std::runtime_error("Invalid Conv Operator (fprop, dgrad, wgrad)");
|
||||
@@ -228,6 +229,7 @@ public:
|
||||
/// Conv device allocations
|
||||
DeviceAllocation *A;
|
||||
DeviceAllocation *B;
|
||||
DeviceAllocation *reordered_B;
|
||||
DeviceAllocation *C;
|
||||
DeviceAllocation *Computed;
|
||||
DeviceAllocation *Reference;
|
||||
@@ -270,6 +272,7 @@ public:
|
||||
Conv2dWorkspace()
|
||||
: A(nullptr),
|
||||
B(nullptr),
|
||||
reordered_B(nullptr),
|
||||
C(nullptr),
|
||||
Computed(nullptr),
|
||||
Reference(nullptr) {}
|
||||
@@ -317,10 +320,10 @@ public:
|
||||
stride_activations.push_back(int(problem.h) * int(problem.w) *
|
||||
int(problem.c));
|
||||
|
||||
stride_filters.push_back(int(problem.c));
|
||||
stride_filters.push_back(int(problem.s) * int(problem.c));
|
||||
stride_filters.push_back(int(problem.c / problem.groups));
|
||||
stride_filters.push_back(int(problem.s) * int(problem.c / problem.groups));
|
||||
stride_filters.push_back(int(problem.r) * int(problem.s) *
|
||||
int(problem.c));
|
||||
int(problem.c / problem.groups));
|
||||
|
||||
stride_output.push_back(int(problem.k));
|
||||
stride_output.push_back(int(problem.q) * int(problem.k));
|
||||
|
||||
Reference in New Issue
Block a user