-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add aten::_thnn_fused_gru_cell and _thnn_fused_lstm_cell #926
base: main
Are you sure you want to change the base?
Conversation
src/ATen/native/xpu/GRUFusedCell.cpp
Outdated
#include <ATen/core/op_registration/adaption.h> | ||
#include <ATen/native/cpu/mixed_data_type.h> | ||
#include <ATen/native/xpu/sycl/GRUFusedCellKernels.h> | ||
#include <ATen/xpu/XPUNativeFunctions.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This header file seems to be non-existent from the build logs.
Would changing to XPUFunctions.h
instead of XPUNativeFunctions.h
make it work?
#include <ATen/core/op_registration/adaption.h> | ||
#include <ATen/native/cpu/mixed_data_type.h> | ||
#include <ATen/native/xpu/sycl/RNNKernels.h> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <ATen/core/op_registration/adaption.h>
#include <ATen/native/cpu/mixed_data_type.h>
please check if we need head files
|
||
auto hy = at::empty_like(hx, LEGACY_CONTIGUOUS_MEMORY_FORMAT); | ||
|
||
AT_DISPATCH_FLOATING_TYPES_AND2( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How we handle non-contiguous input ? CUDA uses tensorInfo, but we just use raw data pointer, without stride information
const Tensor& hidden_bias = | ||
c10::value_or_else(hidden_bias_opt, [] { return Tensor(); }); | ||
|
||
auto batched_input = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If hard code true
, can we remove it
@yucai-intel Pls show the testcase |
_thnn_fused_gru_cell_forward
_thnn_fused_gru_cell_backward
_thnn_fused_lstm_cell_forward
_thnn_fused_lstm_cell_backward