okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
ad33b8074
main
1// src/core/peer_experts.cpp (SYCL port) - upstream's --peer-device tier (a second GPU as an expert-cache tier, 0.1.36+) 2// is CUDA-only for now: this build answers "no peer". open() refuses with a message, so --peer-device fails clearly, 3// and every other entry point is the state a run without --peer-device has. Upstream's file: src/core/peer_experts.cpp. 4#include "strata/core/peer_experts.hpp" 5 6#include <atomic> 7 8namespace strata::core { 9 10namespace { 11std::atomic < bool > g_portable {false}; 12}// namespace 13 14void set_peer_portable (bool on ) {g_portable .store (on ); } 15bool peer_portable () {return g_portable .load (); } 16 17PeerExperts ::~PeerExperts () {close (); } 18 19bool PeerExperts ::open (int ,const std::vector < std::pair < int32_t ,int32_t >>& ,const ExpertCache & ,ExpertSource & ,int64_t , 20int64_t ,int ,int64_t , std::string & err ) { 21err = "--peer-device: the second-GPU expert tier is not ported to SYCL yet" ; 22return false; 23} 24 25void PeerExperts ::close () {device_ = -1 ; } 26 27bool PeerExperts ::launch (int64_t ,const float * ,const int32_t * ,int64_t ,int64_t ,const int32_t * , std::string & err , 28float * ) { 29err = "--peer-device: not available in the SYCL build" ; 30return false; 31} 32 33bool PeerExperts ::finish (float * , std::string & err ) { 34err = "--peer-device: not available in the SYCL build" ; 35return false; 36} 37 38bool PeerExperts ::adapt (const float * ,const int32_t * ,int , std::string & ) {return true; } 39void PeerExperts ::apply_pending (bool ) {} 40 41}// namespace strata::core