[SYCL][GRAPH] Fix infinite loop bug in tryReuseExistingAllocation (#21170)
Bug introduced in https://github.com/intel/llvm/pull/19049
The bug causes llama CLI hang on any prompt if llama is run with graphs.
After the fix llama CLI works.
@reble , there is a gap in sycl graphs unittesting which do not covered
this case. You may consider adding some full-app (like llama CLI) graphs
functional tests, which could also easily catch such issues.
---------
Signed-off-by: Matthew Michel <matthew.michel@intel.com>
Co-authored-by: Matthew Michel <matthew.michel@intel.com>