This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Decode JPEG data directly into CUDA tensors with nvImageCodec. | |
| The decoder enables fancy chroma upsampling and asks nvImageCodec to produce the | |
| requested color order and layout directly. Compressed JPEG data remains on the | |
| host, while decoded pixels are allocated in GPU memory and exposed to PyTorch | |
| without copying through DLPack/CUDA array interoperability. | |
| ``` | |
| import cv2 | |
| import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # The algorithm proposed by https://github.com/triton-lang/triton/pull/7558 | |
| from dataclasses import dataclass | |
| from enum import Enum | |
| def inverse_permutation(P): | |
| """ | |
| Given a permutation P, return its inverse permutation. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### A Pluto.jl notebook ### | |
| # v0.17.4 | |
| using Markdown | |
| using InteractiveUtils | |
| # ╔═╡ 72851118-6cb1-11ec-3338-8d9690c97989 | |
| begin | |
| using Plots,LaTeXStrings | |
| import PlotlyJS |