File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2222namespace phi {
2323
2424template <typename T, typename Context>
25- void AssertKernel (const Context& ctx ,
25+ void AssertKernel (const Context& dev_ctx ,
2626 const DenseTensor& cond,
2727 const std::vector<const DenseTensor*>& data,
2828 int64_t summarize) {
Original file line number Diff line number Diff line change 2323namespace phi {
2424
2525template <typename T, typename Context>
26- void DataKernel (const Context& ctx ,
26+ void DataKernel (const Context& dev_ctx ,
2727 const std::string& name,
2828 const phi::IntArray& shape,
2929 phi::DataType data_type,
3030 DenseTensor* out) {}
3131
3232template <typename T, typename Context>
33- void ShadowOutputKernel (const Context& ctx ,
33+ void ShadowOutputKernel (const Context& dev_ctx ,
3434 const DenseTensor& x,
3535 DenseTensor* out) {}
3636
Original file line number Diff line number Diff line change @@ -20,24 +20,24 @@ limitations under the License. */
2020namespace phi {
2121
2222template <typename T, typename Context>
23- void ShapeKernel (const Context& ctx ,
23+ void ShapeKernel (const Context& dev_ctx ,
2424 const DenseTensor& input,
2525 DenseTensor* out) {
2626 auto & in_dims = input.dims ();
2727 out->Resize ({in_dims.size ()});
28- auto out_data = ctx .template HostAlloc <int32_t >(out);
28+ auto out_data = dev_ctx .template HostAlloc <int32_t >(out);
2929 for (int i = 0 ; i < in_dims.size (); ++i) {
3030 out_data[i] = in_dims[i];
3131 }
3232}
3333
3434template <typename T, typename Context>
35- void Shape64Kernel (const Context& ctx ,
35+ void Shape64Kernel (const Context& dev_ctx ,
3636 const DenseTensor& input,
3737 DenseTensor* out) {
3838 auto & in_dims = input.dims ();
3939 out->Resize ({in_dims.size ()});
40- auto out_data = ctx .template HostAlloc <int64_t >(out);
40+ auto out_data = dev_ctx .template HostAlloc <int64_t >(out);
4141 for (int i = 0 ; i < in_dims.size (); ++i) {
4242 out_data[i] = in_dims[i];
4343 }
You can’t perform that action at this time.
0 commit comments