mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Disable c10::optional macros (#138912)
Test Plan: Sandcastle Pull Request resolved: https://github.com/pytorch/pytorch/pull/138912 Approved by: https://github.com/Skylion007, https://github.com/malfet
This commit is contained in:
parent
c3f3a6e4d2
commit
e2d47a133b
4 changed files with 9 additions and 4 deletions
|
|
@ -194,7 +194,7 @@ at::Tensor quantized_convolution(
|
|||
Tensor scratchpad_tensor = at::empty(
|
||||
{static_cast<int64_t>(scratchpad_size)},
|
||||
act.options().dtype(at::kByte),
|
||||
c10::nullopt);
|
||||
std::nullopt);
|
||||
auto scratchpad_m = make_onednn_memory(
|
||||
conv_fwd_pd.scratchpad_desc(), engine, scratchpad_tensor.data_ptr());
|
||||
args.insert({DNNL_ARG_SCRATCHPAD, scratchpad_m});
|
||||
|
|
|
|||
|
|
@ -94,12 +94,12 @@ class QConvoneDNNXPU final {
|
|||
output,
|
||||
inv_output_scale,
|
||||
output_zero_point,
|
||||
/*accum*/ c10::nullopt,
|
||||
/*accum*/ std::nullopt,
|
||||
/*accum_scale*/ 0.0,
|
||||
/*accum_zero_point*/ 0,
|
||||
/*output_dtype*/ output_dtype,
|
||||
/*binary_attr*/ c10::nullopt,
|
||||
/*binary_alpha*/ c10::nullopt,
|
||||
/*binary_attr*/ std::nullopt,
|
||||
/*binary_alpha*/ std::nullopt,
|
||||
/*unary_attr*/ attr,
|
||||
/*unary_scalars*/ scalars,
|
||||
/*unary_algorithm*/ algorithm);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
// up builds.
|
||||
|
||||
namespace c10 {
|
||||
|
||||
#if !defined(FBCODE_CAFFE2) && !defined(C10_NODEPRECATED)
|
||||
// NOLINTNEXTLINE(misc-unused-using-decls)
|
||||
using std::bad_optional_access;
|
||||
// NOLINTNEXTLINE(misc-unused-using-decls)
|
||||
|
|
@ -19,6 +21,7 @@ using std::nullopt;
|
|||
using std::nullopt_t;
|
||||
// NOLINTNEXTLINE(misc-unused-using-decls)
|
||||
using std::optional;
|
||||
#endif
|
||||
|
||||
#if !defined(FBCODE_CAFFE2) && !defined(C10_NODEPRECATED)
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,10 @@ namespace torch {
|
|||
// the `func()` function defined in `at::` namespace is always hidden.
|
||||
using namespace at; // NOLINT
|
||||
|
||||
#if !defined(FBCODE_CAFFE2) && !defined(C10_NODEPRECATED)
|
||||
using std::nullopt; // NOLINT
|
||||
using std::optional; // NOLINT
|
||||
#endif
|
||||
|
||||
using Dtype = at::ScalarType;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue