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

[Linux Debug Build] [Patch] [Needinfo] OpTensorSyncDevice.hpp:61: error: private field is not used #1722

Closed
1 of 2 tasks
themanyone opened this issue Dec 7, 2023 · 0 comments

Comments

@themanyone
Copy link

themanyone commented Dec 7, 2023

System Info

$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         36 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  8
  On-line CPU(s) list:   0-7
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i7-2860QM CPU @ 2.50GHz
    CPU family:          6
    Model:               42
    Thread(s) per core:  2
    Core(s) per socket:  4
    Socket(s):           1
    Stepping:            7
    CPU(s) scaling MHz:  61%
    CPU max MHz:         3600.0000
    CPU min MHz:         800.0000
    BogoMIPS:            4988.46
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
                          pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx rd
                         tscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopolog
                         y nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cp
                         l vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic 
                         popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti ssbd ibrs
                          ibpb stibp tpr_shadow flexpriority ept vpid xsaveopt dtherm ida 
                         arat pln pts vnmi md_clear flush_l1d
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   128 KiB (4 instances)
  L1i:                   128 KiB (4 instances)
  L2:                    1 MiB (4 instances)
  L3:                    8 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-7
Vulnerabilities:         
  Gather data sampling:  Not affected
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vul
                         nerable
  Mds:                   Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Unknown: No mitigations
  Retbleed:              Not affected
  Spec rstack overflow:  Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitizat
                         ion
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditio
                         nal, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected

Issue

Multiple errors regarding the following buffers not being used.

    vk::Buffer *mStagingBuffer;
    vk::DeviceSize mSize;
src/gpt4all/gpt4all-backend/llama.cpp-mainline/kompute/src/include/kompute/operations/OpTensorSyncDevice.hpp:61: error: private field 'mPrimaryBuffer' is not used [-Werror,-Wunused-private-field]
In file included from src/gpt4all/gpt4all-backend/llama.cpp-mainline/kompute/src/OpTensorSyncDevice.cpp:11:
src/gpt4all/gpt4all-backend/llama.cpp-mainline/kompute/src/include/kompute/operations/OpTensorSyncDevice.hpp:61:17: error: private field 'mPrimaryBuffer' is not used [-Werror,-Wunused-private-field]
    vk::Buffer *mPrimaryBuffer;
                ^

What I wound up doing is changing ALWAYS OWNED RESOURCES from private to to public.

OpTensorSyncDevice.hpp

  private:
    // -------------- ALWAYS OWNED RESOURCES
    std::vector<std::shared_ptr<Tensor>> mTensors;
    vk::Buffer *mPrimaryBuffer;
    vk::Buffer *mStagingBuffer;
    vk::DeviceSize mSize;

It at least allows it to compile. But I'm no paragon of C++. Comments?

Information

  • The official example notebooks/scripts
  • My own modified scripts

Reproduction

Following instructions in build_and_run.md
Configure project
Build project
OpTensorSyncDevice.hpp:61: error: private field 'mPrimaryBuffer' is not used [-Werror,-Wunused-private-field]

Expected behavior

*Compiles

cebtenzzre added a commit to nomic-ai/kompute that referenced this issue Jan 8, 2024
cebtenzzre added a commit to nomic-ai/llama.cpp that referenced this issue Jan 8, 2024
cebtenzzre added a commit to nomic-ai/kompute that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant