"...gpu/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "ce3560a729e52f3a6f3a6120c248cd041e22093a"
Unverified Commit 02a0b430 authored by Teven's avatar Teven Committed by GitHub
Browse files

Fixed TextGenerationPipeline on torch + GPU (#5629)

* Pytorch gpu => cpu proper device

* Memoryless XLNet warning + fixed memories during generation

* Revert "Memoryless XLNet warning + fixed memories during generation"

This reverts commit 3d3251ff

* Took the operations on the generated_sequence out of the ensure_device scope
parent 760f726e
......@@ -689,6 +689,8 @@ class TextGenerationPipeline(Pipeline):
result = []
for generated_sequence in output_sequences:
if self.framework == "pt" and generated_sequence is not None:
generated_sequence = generated_sequence.cpu()
generated_sequence = generated_sequence.numpy().tolist()
record = {}
if return_tensors:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment