From ea1dd1cd906dd98f5404d690158a93faa0d06c15 Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Mon, 14 Jun 2021 16:00:54 -0700 Subject: [PATCH] Remove a few more comments I missed in the last commit. --- lib/CAPI/BasicpyTypes.cpp | 9 --------- lib/CAPI/TorchTypes.cpp | 4 ---- 2 files changed, 13 deletions(-) diff --git a/lib/CAPI/BasicpyTypes.cpp b/lib/CAPI/BasicpyTypes.cpp index 4548d3412..cdadcfc75 100644 --- a/lib/CAPI/BasicpyTypes.cpp +++ b/lib/CAPI/BasicpyTypes.cpp @@ -44,12 +44,10 @@ MlirType npcompBasicpyBytesTypeGet(MlirContext context) { // Dict type. //===----------------------------------------------------------------------===// -/** Checks whether the given type is the Python "dict" type. */ bool npcompTypeIsABasicpyDict(MlirType t) { return unwrap(t).isa(); } -/** Gets the generic Python "dict" type. */ MlirType npcompBasicpyDictTypeGet(MlirContext context) { return wrap(Basicpy::DictType::get(unwrap(context))); } @@ -58,12 +56,10 @@ MlirType npcompBasicpyDictTypeGet(MlirContext context) { // List type. //===----------------------------------------------------------------------===// -/** Checks whether the given type is the Python "list" type. */ bool npcompTypeIsABasicpyList(MlirType t) { return unwrap(t).isa(); } -/** Gets the generic Python "dict" type. */ MlirType npcompBasicpyListTypeGet(MlirContext context) { return wrap(Basicpy::ListType::get(unwrap(context))); } @@ -72,12 +68,10 @@ MlirType npcompBasicpyListTypeGet(MlirContext context) { // !basicpy.NoneType type. //===----------------------------------------------------------------------===// -/** Checks whether the given type is a `!basicpy.NoneType`. */ bool npcompTypeIsANone(MlirType t) { return unwrap(t).isa(); } -/** Gets the `!basicpy.NoneType` type. */ MlirType npcompBasicpyNoneTypeGet(MlirContext context) { return wrap(Basicpy::NoneType::get(unwrap(context))); } @@ -104,13 +98,10 @@ MlirType npcompBasicPySlotObjectTypeGet(MlirContext context, // Tuple type. //===----------------------------------------------------------------------===// -/** Checks whether the given type is the special "any dtype" type that is used - * to signal an NDArray or tensor of unknown type. */ bool npcompTypeIsABasicpyTuple(MlirType t) { return unwrap(t).isa(); } -/** Gets the "any dtype" type. */ MlirType npcompBasicpyTupleTypeGet(MlirContext context) { return wrap(Basicpy::TupleType::get(unwrap(context))); } diff --git a/lib/CAPI/TorchTypes.cpp b/lib/CAPI/TorchTypes.cpp index f689b04d2..452c9ddfe 100644 --- a/lib/CAPI/TorchTypes.cpp +++ b/lib/CAPI/TorchTypes.cpp @@ -20,12 +20,10 @@ using namespace mlir::NPCOMP; // torch.nn.Module type. //===----------------------------------------------------------------------===// -/** Checks whether the given type is a torch.nn.Module type */ bool npcompTypeIsATorchNnModule(MlirType t) { return unwrap(t).isa(); } -/** Gets the torch.nn.Module type of the specified class. */ MlirType npcompTorchNnModuleTypeGet(MlirContext context, MlirStringRef className) { return wrap(Torch::NnModuleType::get(unwrap(context), unwrap(className))); @@ -35,12 +33,10 @@ MlirType npcompTorchNnModuleTypeGet(MlirContext context, // torch.optional type. //===----------------------------------------------------------------------===// -/** Checks whether the given type is a !torch.optional type */ bool npcompTypeIsATorchOptional(MlirType t) { return unwrap(t).isa(); } -/** Gets the !torch.optional type with subtype T. */ MlirType npcompTorchOptionalTypeGet(MlirType containedType) { return wrap(Torch::OptionalType::get(unwrap(containedType))); }