[DOCS] fix tutorials for v2.0 (#422)

- Fix meta-parameter usage on tutorials.
- Install tutorial dependencies on CI.
- Switch from `requirements-test.txt` to `extras_require` for test dependencies, and also use it for tutorial dependencies.
- Make some performance tests deterministic.
This commit is contained in:
Madeleine Thompson
2022-01-07 12:34:38 -08:00
committed by GitHub
parent 8bf551ae7a
commit 9801aa7b56
11 changed files with 54 additions and 32 deletions

View File

@@ -42,9 +42,8 @@ def _dropout(
output_ptr, # pointer to the output
n_elements, # number of elements in the `x` tensor
p, # probability that an element of `x` is changed to zero
**meta,
BLOCK_SIZE: tl.constexpr,
):
BLOCK_SIZE = meta['BLOCK_SIZE']
pid = tl.program_id(axis=0)
block_start = pid * BLOCK_SIZE
offsets = block_start + tl.arange(0, BLOCK_SIZE)
@@ -108,10 +107,9 @@ def _seeded_dropout(
n_elements,
p,
seed,
**meta,
BLOCK_SIZE: tl.constexpr,
):
# compute memory offsets of elements handled by this instance
BLOCK_SIZE = meta['BLOCK_SIZE']
pid = tl.program_id(axis=0)
block_start = pid * BLOCK_SIZE
offsets = block_start + tl.arange(0, BLOCK_SIZE)