Datasets:
Download tile_kernels_src/tile_kernels/utils.py from CLIWorks/Spider-FLEXITOKENS-FP8: direct link, hf CLI and curl.
- Browser
- Download file 210 Bytes
-
https://huggingface.co/datasets/CLIWorks/Spider-FLEXITOKENS-FP8/resolve/main/tile_kernels_src/tile_kernels/utils.py
- Command line
-
hf download hf://datasets/CLIWorks/Spider-FLEXITOKENS-FP8/tile_kernels_src/tile_kernels/utils.py
-
curl -L -o utils.py https://huggingface.co/datasets/CLIWorks/Spider-FLEXITOKENS-FP8/resolve/main/tile_kernels_src/tile_kernels/utils.py
210 Bytes
| def ceil_div(x: int, y: int) -> int: | |
| return (x + y - 1) // y | |
| def align(x: int, y: int) -> int: | |
| return ceil_div(x, y) * y | |
| def is_power_of_two(x: int) -> bool: | |
| return x > 0 and (x & (x - 1)) == 0 | |