mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-11-03 09:22:01 +00:00 
			
		
		
		
	[SYCL] Fix SYCL im2col and convert Overflow with Large Dims (#9052)
				
					
				
			* sycl: fix im2col overflow and sync with cuda Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * sycl: fix convert overflow Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * sycl: fix convert and dequantize Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * sycl: fix ib in dmmv Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * sycl:refine convert Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * sycl: move downsample global_range into common Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * test: add im2col and convert test cases Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * test: make new cases only in sycl Signed-off-by: zhentaoyu <zhentao.yu@intel.com> * test: comment new test_cases for only local testing Signed-off-by: zhentaoyu <zhentao.yu@intel.com> --------- Signed-off-by: zhentaoyu <zhentao.yu@intel.com>
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
			
		||||
#include "presets.hpp"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static void convert_f16(const void * vx, const int ib, const int iqs, dfloat2 & v){
 | 
			
		||||
static void convert_f16(const void * vx, const int64_t ib, const int iqs, dfloat2 & v){
 | 
			
		||||
    const sycl::half *x = (const sycl::half *)vx;
 | 
			
		||||
 | 
			
		||||
    // automatic half -> float type cast if dfloat == float
 | 
			
		||||
@@ -12,7 +12,7 @@ static void convert_f16(const void * vx, const int ib, const int iqs, dfloat2 &
 | 
			
		||||
    v.y() = x[ib + iqs + 1];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void convert_f32(const void * vx, const int ib, const int iqs, dfloat2 & v){
 | 
			
		||||
static void convert_f32(const void * vx, const int64_t ib, const int iqs, dfloat2 & v){
 | 
			
		||||
    const float * x = (const float *) vx;
 | 
			
		||||
 | 
			
		||||
    // automatic half -> float type cast if dfloat == float
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user