Skip to content
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

8 cards inference with input length 50k with device critical error #1035

Open
2 of 4 tasks
ClarkChin08 opened this issue Jun 3, 2024 · 1 comment
Open
2 of 4 tasks
Labels
bug Something isn't working

Comments

@ClarkChin08
Copy link

ClarkChin08 commented Jun 3, 2024

System Info

Optimum-habana: main dd3cc08937a85175eafd3b511484c86fed889b79
Docker images: vault.habana.ai/gaudi-docker/1.15.1/ubuntu22.04/habanalabs/pytorch-installer-2.2.0:latest
DeepSpeed: main 7e475fbdcf45d763f83d47dd6c9c181be731d92e

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

The replay script is like these:
cd examples/text-generation/
export PT_HPU_MAX_COMPOUND_OP_SIZE=1000
export PT_HPU_POOL_MEM_ACQUIRE_PERC=100
export PT_HPU_ENABLE_LAZY_COLLECTIVES=true
export DEEPSPEED_HPU_ZERO3_SYNC_MARK_STEP_REQUIRED=1
python ../gaudi_spawn.py --use_deepspeed --world_size 8 run_generation.py
--use_hpu_graphs
--use_flash_attention
--flash_attention_recompute
--flash_attention_causal_mask
--use_kv_cache
--limit_hpu_graphs
--batch_size 1
--model_name_or_path /chenxi/models--01-ai--Yi-34B/snapshots/51a24adb588163efeefde6cb452feef8a677cdae/
--trim_logits
--max_input_tokens -1
--bf16
--prompt "It is done, and submitted. You can play 'Survival of the Tastiest' on the Android, and on the web. Playing on the web works, but you have to simulate multiple touch for table moving and that can be a bit confusing. There is a lot I'd like to talk about. I will go through every topic, instead of making the typical what went right/wrong list. Concept Working over the theme was probably one of the hardest tasks which I had to face. Originally, I had an idea of what kind of game I wanted to develop, gameplay wise - something with a lot of enemies/actors, simple graphics, maybe set in the space, controlled from a top-down view. I was confident that I could fit any theme around it. In the end, the problem with a theme like 'Evolution' in a game is that evolution is unassisted. It happens through several seemingly random mutations over time, with the most apt permutation surviving. This genetic car simulator is, in my opinion, a great example of actual evolution of a species facing a challenge. But is it a game? In a game, you need to control something to reach an objective. That control goes against what evolution is supposed to be like. If you allow the user to pick how to evolve something, it's not evolution anymore - it's the equivalent of intelligent design, the fable invented by creationists to combat the idea of evolution. Being agnostic and a Pastafarian, that's not something that rubbed me the right way. Hence, my biggest dilemma when deciding what to create was not with what I wanted to create, but with what I did not. I didn't want to create an 'intelligent design' simulator and wrongly call it evolution. This is a problem, of course, every other contestant also had to face it. And judging by the entries submitted, not many managed to work around it. I'd say the only real solution was through the use of artificial selection, somehow. So far, I haven't seen any entry using this at its core gameplay. Alas, this is just a fun competition and after a while I decided not to be as strict with the game idea, and allowed myself to pick whatever I thought would work out. My initial idea was to create something where humanity tried to evolve to a next level, but had some kind of foe trying to stop them from doing so. I kind of had this image of human souls flying in space towards a monolith or a space baby (all based in 2001: A Space Odyssey of course) but I couldn't think of compelling (read: serious) mechanics for that. Borgs were my next inspiration, as their whole hypothesis fit pretty well into the evolution theme. But how to make it work? Are you the borg, or fighting the Borg? The third and final idea came to me through my girlfriend, who somehow gave me the idea of making something about the evolution of Pasta. The more I thought about it the more it sounded like it would work, so I decided to go with it. Conversations with my inspiring co-worker Roushey (who also created the 'Mechanical Underdogs' signature logo for my intros) further matured the concept, as it involved into the idea of having individual pieces of pasta flying around and trying to evolve until they became all-powerful. A secondary idea here was that the game would work to explain how the Flying Spaghetti Monster came to exist - by evolving from a normal dinner table. So the idea evolved more or less into this: you are sitting a table. You have your own plate, with is your 'base'. There are 5 other guests at the table, each with their own plate. Your plate can spawn little pieces of pasta. You do so by 'ordering' them through a menu. Some pastas are better than others; some are faster, some are stronger. They have varying 'costs', which are debited from your credits (you start with a number of credits). Once spawned, your pastas start flying around. Their instinct is to fly to other plates, in order to conquer them (the objective of the game is having your pasta conquer all the plates on the table). But they are really autonomous, so after being spawned, you have no control over your pasta (think DotA or LoL creeps). Your pasta doesn't like other people's pasta, so if they meet, they shoot sauce at each other until one dies. You get credits for other pastas your own pasta kill."

NOTICE:

  1. The context above is 1K input, Then in run_generation.py:304 make the input * 50 to be 50K, the code like below:
    input_sentences = [p * 50 for p in args.prompt]
  2. I enabled the Zero stage3 by add this lines in utils.py:279
    config_dict = {'zero': {'stage': 3, 'overlap_comm': False}}
    model = deepspeed.init_inference(model, config=config_dict, **ds_inference_kwargs)

Expected behavior

Then run the script. It will have fatal error:
Synapse detected a device critical error that requires a restart. Killing process in 5 seconds (hl: 7) 06:37:23 [please check log files for dfa cause].

@ClarkChin08 ClarkChin08 added the bug Something isn't working label Jun 3, 2024
@ClarkChin08 ClarkChin08 changed the title Different TP Size did not increase the input length with device critical error 8 cards inference with input length 50k with device critical error Jun 3, 2024
@regisss
Copy link
Collaborator

regisss commented Oct 22, 2024

@ClarkChin08 Still having this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants