Skip to content

[Runtime] Refactor NDArrayCache Support#15659

Merged
tqchen merged 1 commit intoapache:unityfrom
junrushao:feature/2023-09-01/ndarray-cache-refactor-again
Sep 2, 2023
Merged

[Runtime] Refactor NDArrayCache Support#15659
tqchen merged 1 commit intoapache:unityfrom
junrushao:feature/2023-09-01/ndarray-cache-refactor-again

Conversation

@junrushao
Copy link
Copy Markdown
Member

This PR refactors the NDArrayCache support with the following changes:

// Existing format
[
  {
    "name": "x0",
    "shard_dim": 0,
  },
  {
    "name": "x1",
    "shard_dim": 1,
  }
]

// New format
{
  "x0": 0,
  "x1": 1,
}

This PR refactors the NDArrayCache support with the following changes:

- Support loading metadata from a string rather than a concrete JSON
  file on disc;
- Remove dependency to std::filesystem as it is not well supported in
  certain platforms yet. Details:
  apache#15654 (comment).
- Simplify format used in `shard-info.json` as detailed below:

```
// Existing format
[
  {
    "name": "x0",
    "shard_dim": 0,
  },
  {
    "name": "x1",
    "shard_dim": 1,
  }
]

// New format
{
  "x0": 0,
  "x1": 1,
}
```
@junrushao junrushao marked this pull request as ready for review September 2, 2023 06:44
@junrushao
Copy link
Copy Markdown
Member Author

CC: @kparzysz-quic @tqchen

junrushao added a commit to junrushao/tvm that referenced this pull request Sep 2, 2023
This PR refactors the NDArrayCache support with the following changes:

- Support loading metadata from a string rather than a concrete JSON
  file on disc;
- Remove dependency to std::filesystem as it is not well supported in
  certain platforms yet. Details:
  apache#15654 (comment).
- Simplify format used in `shard-info.json` as detailed below:

```
// Existing format
[
  {
    "name": "x0",
    "shard_dim": 0,
  },
  {
    "name": "x1",
    "shard_dim": 1,
  }
]

// New format
{
  "x0": 0,
  "x1": 1,
}
```
junrushao added a commit to junrushao/tvm that referenced this pull request Sep 2, 2023
This PR refactors the NDArrayCache support with the following changes:

- Support loading metadata from a string rather than a concrete JSON
  file on disc;
- Remove dependency to std::filesystem as it is not well supported in
  certain platforms yet. Details:
  apache#15654 (comment).
- Simplify format used in `shard-info.json` as detailed below:

```
// Existing format
[
  {
    "name": "x0",
    "shard_dim": 0,
  },
  {
    "name": "x1",
    "shard_dim": 1,
  }
]

// New format
{
  "x0": 0,
  "x1": 1,
}
```
@tqchen tqchen merged commit 1d56770 into apache:unity Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants