Comments (6)
Seems like there are a number of functions that are not yet implemented for float8 types on either cpu or cuda:
- .item() for cuda
- unique for cpu and cuda
- torch.index_select for cpu and cuda
- torch.equal for cpu
- fill_ for cpu
- torch.where for cpu and cuda
That is all I have found so far.
Would following the same approach as #116806 be sufficient to add float8 support for the above?
from pytorch.
Seems like item()
on cuda just doesn't support the float8 dtypes yet (which the graph passes in inductor happen to rely on):
# this works for me on cpu, but not on cuda
>>> x = torch.tensor(2, dtype=torch.float8_e4m3fn, device='cuda')
>>> y = x.item()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: "_local_scalar_dense_cuda" not implemented for 'Float8_e4m3fn'
cc @drisspg @vkuzo, should we just add .item() support for float8 cuda?
from pytorch.
yes we should add it, I can take a look but not sure on the timeline, if anyone can get to it sooner happy to help / review the code
from pytorch.
Can I give this a shot?
from pytorch.
will let @ajbrent and @vkuzo figure it out
from pytorch.
Would following the same approach as #116806 be sufficient to add float8 support for the above?
Thanks for offering to help! Yes, that approach is reasonable. I'd also say there is no expectation for every op to work for float8. The only numerics changing op with hardware support is a gemm (torch._scaled_mm), and there are other ops which are useful such as torch.cat
, item()
, etc which do not change numerics. We don't want to add support for things like torch.add
with float8 inputs. The ops you listed in the comment above all sound good to me, although I'm not sure I'd prioritize things like unique
unless there is a use case.
If you are up for also adding fill_out
that would help close #128257!
from pytorch.
Related Issues (20)
- DISABLED test_graph_grad_scaling_foreach_False_fused_False_Adam_cuda_float32 (__main__.TestCudaOptimsCUDA) HOT 1
- `num_features` of `nn.BatchNorm1d()` with a tuple of `int` works
- _RendezvousJoinOp module initiation results in crash if state.deadline is none and datetime.utcnow() is deprecated HOT 2
- torch.linalg.lstsq: Argument 7 has illegal value. HOT 1
- MultiLabelMarginLoss with customized margin. HOT 1
- NotImplementedError: The operator 'aten::isin.Tensor_Tensor_out' is not currently implemented for the MPS device. HOT 1
- Dynamo: warning when we incorrectly inline autograd.Function.backward due to subclass gradients HOT 2
- test_c10d_nccl failure on A100 and H100 HOT 4
- [inductor][user triton] tensor used as a view in triton kernel is returned as the original (not viewed) dtype
- DISABLED test_pcontext_wait_on_a_child_thread (__main__.StartProcessesAsFuncTest) HOT 2
- OperatorBench Plan HOT 6
- DISABLED test_graph_grad_scaling_foreach_False_fused_False_SGD_cuda_float32 (__main__.TestCudaOptimsCUDA) HOT 2
- Disable Python torch.library calls under torch::deploy
- [ONNX] Inputs generated by onnx.export() with dynamo=False are not consistent with dynamo=True
- Corrupt Traces Due to PyTorch Inductor Config Name Control Characters HOT 5
- [inductor] assert_close numerics failed when fusing abs,max,clamp,mul,reciprocal (needed by float8) HOT 7
- "bmm_sparse_cuda" not implemented for 'BFloat16'
- Unable to Specify CUDA Stream for Collective Operations Using with torch.cuda.stream() context HOT 4
- linux-aarch64 CI tests are being timed out resulting in test failures HOT 6
- [Bug][CompiledAutograd] PyTorch with CompiledAutograd throws an IndexError: list index out of range when the hook code includes a list append operation. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch.