Skip to content

Commit

Permalink
use float buffers to accumulate for BFloat16 upsample backward
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoE committed Dec 23, 2022
1 parent be41a3f commit 3905d48
Show file tree
Hide file tree
Showing 3 changed files with 680 additions and 50 deletions.
2 changes: 1 addition & 1 deletion aten/src/ATen/native/UpSample.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ template <typename scalar_t>
static inline scalar_t compute_scales_value(
const c10::optional<double> scale,
int64_t input_size,
int64_t output_size) {
int64_t output_size) {
// see Note [compute_scales_value]
// FIXME: remove magic > 0 after we ensure no models were serialized with -1 defaults.
return (scale.has_value() && scale.value() > 0.)
Expand Down

0 comments on commit 3905d48

Please sign in to comment.