File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 */
1919
2020/* !
21- * \file tvm/ir /config_schema.h
21+ * \file tvm/target /config_schema.h
2222 * \brief Minimal schema for dynamic config canonicalization and validation.
2323 *
2424 * This utility is intended for dynamic map-like configs (e.g. Target options),
2525 * where we still want type checking, optional defaulting, and canonicalization.
2626 */
27- #ifndef TVM_IR_CONFIG_SCHEMA_H_
28- #define TVM_IR_CONFIG_SCHEMA_H_
27+ #ifndef TVM_TARGET_CONFIG_SCHEMA_H_
28+ #define TVM_TARGET_CONFIG_SCHEMA_H_
2929
3030#include < tvm/ffi/container/map.h>
3131#include < tvm/ffi/function.h>
3939#include < vector>
4040
4141namespace tvm {
42- namespace ir {
4342
4443/* !
4544 * \brief Dynamic config schema for map-like options.
@@ -236,7 +235,6 @@ class ConfigSchema {
236235 bool error_on_unknown_ = true ;
237236};
238237
239- } // namespace ir
240238} // namespace tvm
241239
242- #endif // TVM_IR_CONFIG_SCHEMA_H_
240+ #endif // TVM_TARGET_CONFIG_SCHEMA_H_
Original file line number Diff line number Diff line change 2727#include < tvm/ffi/container/map.h>
2828#include < tvm/ffi/function.h>
2929#include < tvm/ffi/reflection/registry.h>
30- #include < tvm/ir/config_schema.h>
3130#include < tvm/runtime/base.h>
31+ #include < tvm/target/config_schema.h>
3232
3333#include < utility>
3434#include < vector>
@@ -75,7 +75,7 @@ class TargetKindNode : public ffi::Object {
7575
7676 private:
7777 /* ! \brief ConfigSchema for validating and resolving target attributes */
78- ir:: ConfigSchema schema_;
78+ ConfigSchema schema_;
7979 friend class TargetKindRegistry ;
8080 friend class TargetKindDef ;
8181 friend class TargetInternal ;
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ TVM_FFI_STATIC_INIT_BLOCK() {
189189 .set_default_device_type (kDLCPU ) // line break
190190 .def_option <ffi::Array<Target>>(
191191 " devices" ,
192- ir:: ConfigSchema::AttrValidator (ffi::TypedFunction<ffi::Any (ffi::Any)>( //
192+ ConfigSchema::AttrValidator (ffi::TypedFunction<ffi::Any (ffi::Any)>( //
193193 [](ffi::Any val) -> ffi::Any {
194194 // Allow elements to be strings or dicts, converting them to Target objects.
195195 if (val.try_cast <ffi::Array<Target>>().has_value ()) return val;
Original file line number Diff line number Diff line change 2121#include < tvm/ffi/container/array.h>
2222#include < tvm/ffi/container/map.h>
2323#include < tvm/ffi/string.h>
24- #include < tvm/ir /config_schema.h>
24+ #include < tvm/target /config_schema.h>
2525
2626using namespace tvm ;
27- using namespace tvm ::ir;
2827namespace refl = tvm::ffi::reflection;
2928
3029// Basic int/bool/string option resolution
You can’t perform that action at this time.
0 commit comments