Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,9 @@ int EmbEltwiseLayernormPluginDynamicImpl<T>::enqueue(
auto emb_ptr_gpu_d =
emb_ptr_tensor_.mutable_data<int64_t>(platform::CUDAPlace(device_id_));

auto new_input_ptr = reinterpret_cast<uintptr_t>(inputs[0]);

if (old_input_ptr_ != new_input_ptr) {
old_input_ptr_ = new_input_ptr;

cudaMemcpyAsync(in_ptr_gpu_d, reinterpret_cast<const void *>(inputs),
sizeof(uintptr_t) * input_num, cudaMemcpyHostToDevice,
stream);
}
cudaMemcpyAsync(in_ptr_gpu_d, reinterpret_cast<const void *>(inputs),
sizeof(uintptr_t) * input_num, cudaMemcpyHostToDevice,
stream);

auto out_type = output_desc[0].type;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class EmbEltwiseLayernormPluginDynamicImpl

framework::Tensor in_ptr_tensor_, emb_ptr_tensor_;
int device_id_{0};
uintptr_t old_input_ptr_{0};
bool is_initialized_{false};
};

Expand Down