Closed mozga-intel closed 2 years ago
@szha @mozga-intel Do you still want my review?
@hcho3 If you can review it, I'll be grateful. Thanks!
Gentle ping @hcho3, @szha
@szha, @hcho3 Thanks! There are a few things to improve: firstly, a constructor that can be declared with a constexpr specifier. Secondly, as @hcho3 mentioned, std::optional
@mozga-intel sounds good. Do you intend to continue in this PR or as a follow-up?
@szha after merge! Because I need to test it before.
not quite sure why yet, but it looks like when i apply this patch to TVM, the following command (in tvm repo, at rev c07a46327c86fc541297ebb985cc9c1dcef5a0db, using docker container tlcpack/ci-cpu:v0.84 and config.cmake generated with tests/scripts/task_config_build_cpu.sh
) segfaults:
cd rust/tvm/examples/resnet
python3 src/build_resnet.py --build-dir=.
still tracing through to see why, but posting up here in case any of you all have ideas.
cc @tqchen
Description
The class template std::optional manages an optional contained value, i.e. a value that may or may not be present. In this pull request, a few things were implemented, such as extended series of constructors and a function of value. Mainly, this pull request is a realization of changes that have an impact on constructors, as follows, (upgrade dmlc::optional constructors):
optional(optional &&other) noexcept() { }
other
parameter.optional(U &&other) noexcept { }
Upgrade: dmlc::optional value
1.
T &value() &
const T &value() const &
T &&value() &
const T && value() const &&