Skip to content

Commit

Permalink
Add proposed major/minor version change
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Jan 4, 2023
1 parent 0bbb70c commit e86f014
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
12 changes: 0 additions & 12 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ TAB_SIZE = 8

ALIASES =

# This tag can be used to specify a number of word-keyword mappings (TCL only).
# A mapping has the form "name=value". For example adding "class=itcl::class"
# will allow you to use the command class in the itcl::class meaning.

TCL_SUBST =

# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
Expand Down Expand Up @@ -1008,13 +1003,6 @@ VERBATIM_HEADERS = YES

ALPHABETICAL_INDEX = YES

# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
# which the alphabetical index list will be split.
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.

COLS_IN_ALPHA_INDEX = 5

# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
Expand Down
10 changes: 9 additions & 1 deletion docs/source/c_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ Macros

.. doxygendefine:: DLPACK_EXTERN_C

.. doxygendefine:: DLPACK_VERSION
.. doxygendefine:: DLPACK_MAJOR_VERSION

.. doxygendefine:: DLPACK_MINOR_VERSION

.. doxygendefine:: DLPACK_DLL

Expand All @@ -22,6 +24,9 @@ Enumerations
Structs
~~~~~~~

.. doxygenstruct:: DLPackVersion
:members:

.. doxygenstruct:: DLDevice
:members:

Expand All @@ -33,3 +38,6 @@ Structs

.. doxygenstruct:: DLManagedTensor
:members:

.. doxygenstruct:: DLManagedTensorVersioned
:members:
26 changes: 13 additions & 13 deletions include/dlpack/dlpack.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
#define DLPACK_EXTERN_C
#endif

/*! \brief The current version of dlpack */
#define DLPACK_VERSION 80
/*! \brief The current major version of dlpack */
#define DLPACK_MAJOR_VERSION 1

/*! \brief The current ABI version of dlpack */
#define DLPACK_ABI_VERSION 2
/*! \brief The current minor version of dlpack */
#define DLPACK_MINOR_VERSION 0

/*! \brief DLPACK_DLL prefix for windows */
#ifdef _WIN32
Expand All @@ -40,19 +40,19 @@ extern "C" {
#endif

/*!
* \brief The DLPack and DLPack ABI versions of the tensor.
* \brief The DLPack version.
*
* The DLPack version changes when we introduce new device type,
* data type that is compatible with existing ones.
* A change in major version indicates that we have changed the
* data layout of the ABI - DLManagedTensorVersioned.
*
* The DLPack ABI version changes when we change the data layout
* of the DLManagedTensorVersioned.
* A change in minor version indicates that we have added new
* code, such as a new device type, but the ABI is kept the same.
*/
typedef struct {
/*! \brief DLPack version. */
uint32_t dlpack;
/*! \brief DLPack ABI version. */
uint32_t abi;
/*! \brief DLPack major version version. */
uint32_t major;
/*! \brief DLPack minor version. */
uint32_t minor;
} DLPackVersion;

/*!
Expand Down

0 comments on commit e86f014

Please sign in to comment.