Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif()

# Define included source files
set(CPP_FILES csrc/common.cpp csrc/cpu_ops.cpp csrc/pythonInterface.cpp)
set(CPP_FILES csrc/cpu_ops.cpp csrc/pythonInterface.cpp)
set(CUDA_FILES csrc/ops.cu csrc/kernels.cu)
set(HIP_FILES csrc/ops.hip csrc/kernels.hip)
set(MPS_FILES csrc/mps_ops.mm)
Expand Down Expand Up @@ -158,7 +158,6 @@ if(BUILD_CUDA)
string(APPEND CMAKE_CUDA_FLAGS " --use_fast_math")

if(PTXAS_VERBOSE)
# Verbose? Outputs register usage information, and other things...
string(APPEND CMAKE_CUDA_FLAGS " -Xptxas=-v")
endif()

Expand Down Expand Up @@ -268,7 +267,7 @@ endif()
set_source_files_properties(${CPP_FILES} PROPERTIES LANGUAGE CXX)
add_library(bitsandbytes SHARED ${SRC_FILES})
target_compile_features(bitsandbytes PUBLIC cxx_std_17)
target_include_directories(bitsandbytes PUBLIC csrc include)
target_include_directories(bitsandbytes PUBLIC csrc)

if (BUILD_CPU)
if (OpenMP_CXX_FOUND)
Expand Down
4 changes: 1 addition & 3 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
The majority of bitsandbytes is licensed under MIT, however portions of the project are available under separate license terms: Pytorch is licensed under the BSD license.

We thank Fabio Cannizzo for this work on FastBinarySearch which is included in this project.
The majority of bitsandbytes is licensed under MIT, however portions of the project are available under separate license terms: PyTorch is licensed under the BSD license.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ The continued maintenance and development of `bitsandbytes` is made possible tha
## License
`bitsandbytes` is MIT licensed.

We thank Fabio Cannizzo for his work on [FastBinarySearch](https://github.com/fabiocannizzo/FastBinarySearch) which we use for CPU quantization.

## How to cite us
If you found this library useful, please consider citing our work:

Expand Down
37 changes: 0 additions & 37 deletions csrc/common.cpp

This file was deleted.

23 changes: 1 addition & 22 deletions csrc/common.h
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
#include <BinSearch.h>

#ifndef common
#define common

using namespace BinSearch;
#pragma once

typedef enum DataType_t {
General8bit = 0,
FP4 = 1,
NF4 = 2,
} DataType_t;

struct quantize_block_args {
BinAlgo<Scalar, float, Direct2>* bin_searcher;
float* code;
float* A;
float* absmax;
unsigned char* out;
long long block_end;
long long block_idx;
long long threadidx;
long long blocksize;
};

void quantize_block(const quantize_block_args& args);

#endif
7 changes: 3 additions & 4 deletions csrc/cpu_ops.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#include <BinSearch.h>
#include <cpu_ops.h>
#include <thread>

#include "cpu_ops.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <thread>
#include <vector>

#ifdef HAS_OPENMP
Expand Down
2 changes: 1 addition & 1 deletion csrc/cpu_ops.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef BITSANDBYTES_CPU_OPS_H
#define BITSANDBYTES_CPU_OPS_H

#include "common.h"
#include <algorithm>
#include <cmath>
#include <common.h>
#include <cstdint>
#include <cstring>
#include <thread>
Expand Down
Empty file removed csrc/mps_ops.h
Empty file.
2 changes: 0 additions & 2 deletions csrc/ops.cu
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

#include <BinSearch.h>
#include <cassert>
#include <cub/device/device_scan.cuh>
#include <kernels.cuh>
Expand All @@ -12,7 +11,6 @@

#define ERR_NOT_IMPLEMENTED 100

using namespace BinSearch;
using std::cout;
using std::endl;

Expand Down
2 changes: 0 additions & 2 deletions csrc/ops.hip
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
#include <hipblaslt/hipblaslt.h>
#endif
#include <limits>
#include <BinSearch.h>
#include <cassert>
#include <common.h>

#define ERR_NOT_IMPLEMENTED 100

using namespace BinSearch;
using std::cout;
using std::endl;

Expand Down
2 changes: 0 additions & 2 deletions docs/source/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ bitsandbytes enables accessible large language models via k-bit quantization for
# License

bitsandbytes is MIT licensed.

We thank Fabio Cannizzo for his work on [FastBinarySearch](https://github.com/fabiocannizzo/FastBinarySearch) which we use for CPU quantization.
86 changes: 0 additions & 86 deletions include/AAlloc.h

This file was deleted.

Loading
Loading