Commit Graph

1379 Commits

Author SHA1 Message Date
Field G. Van Zee
658f0a129b Fixed obscure integer size bug in va_arg() usage.
Details:
- Fixed a bug in the way that the variadic bli_cntx_set_l3_nat_ukrs()
  function was defined. This function is meant to take a microkernel id,
  microkernel datatype, microkernel address, and microkernel preference
  as arguments, and is typically called within the bli_cntx_init_*()
  function defined within a sub-configuration for initializing an
  appropriate context. The problem is with the final argument: the
  microkernel preference. These preferences are actually boolean values,
  0 or 1 (encoded as FALSE or TRUE). Since the variadic function does
  not give the compiler any type information for any variadic arguments,
  they are "promoted" in the course of internal (macroized) processing
  according to default argument promotion rules. Thus, integer literals
  such as 0 and 1 become int and floating-point literals (such as 0.0 or
  1.0) become double. Previous to this commit, we indicated to va_arg()
  that the ukernel preference was a 'bool_t', which is a typedef of
  int64_t on 64-bit systems. On systems where int is defined as 64 bits,
  no problems manifest since int is the same size as the type we passed
  in to va_arg(), but on systems where int is 32 bits, the ukernel
  preference could be misinterpreted as a garbage value. (This was
  observed on a modern armv8 system.) The fix was to interpret the
  bool_t value as int and then immediately typecast it to and store it
  as a bool_t. Special thanks to Devangi Parikh for helping track down
  this issue, including deciphering the use of va_arg() and its
  byzantine treatment of types.
- Added explicit typecasts for all invocations of va_arg() in
  bli_cntx.c.
2018-08-24 17:49:37 -05:00
Field G. Van Zee
e71dc38912 Fixed a very minor memory leak in gks.
Details:
- Fixed a memory leak in the global kernel structure that resulted in 56
  bytes per configured architecture (of which only 18 are presently
  supported by BLIS). The leak would only manifest if BLIS was
  initialized and then finalized before the application terminated.
  Thanks to Devangi Parikh for helping track down this leak.
2018-08-24 15:56:04 -05:00
Field G. Van Zee
a7e3a5f975 Fixed uncallable bli_finalize().
Details:
- Previously, bli_finalize_once()--which, like bli_init_once(), was
  implemented in terms of pthread_once()--was using the same
  pthread_once_t control object being used by bli_init(), thus
  guaranteeing that it would never be called as long as BLIS had already
  been initialized. This could manifest as a rather large memory leak to
  any application that attempted to finalize BLIS midway through its
  execution (since BLIS reserves several megabytes of storage for
  packing buffers per thread used). The fix entailed giving each
  function its own pthread_once_t object. Thanks to Devangi Parikh for
  helping track down this very quiet bug.
2018-08-24 14:51:11 -05:00
Field G. Van Zee
a79c21c7c1 Fixed cleanmk target post-1b0f8d6.
Details:
- Changed the cleanmk target to delete makefile fragments from their new
  home in obj/$(CONFIG_NAME). The old definition worked only because of
  a typo (REFERKN_PATH instead of REFKERN_PATH), and only in the
  non-verbose (V != 1) case.
2018-08-23 14:40:46 -05:00
Field G. Van Zee
ffb57242f3 Cosmetic output changes to configure.
Details:
- Disable sandbox-related obj directory creation, directory mirroring,
  and makefile fragment generation when a sandbox is not enabled.
- Prevent various duplicate actions by configure (such as those
  mentioned above for sandboxes above).
2018-08-22 18:22:41 -05:00
Field G. Van Zee
ac17454aae Merge branch 'master' into dev 2018-08-22 15:34:53 -05:00
Field G. Van Zee
a77bec766a Whitespace changes, minor renames in build system.
Details:
- Minor whitespace cleanup, mostly in the form of spaces -> tabs.
- Shortened certain variables' _FRAGMENT_ infixes to _FRAG_ in
  common.mk.
2018-08-22 15:31:29 -05:00
Devin Matthews
1b0f8d60d1 Generate makefile fragments in build tree (#240)
* Make src dir read-only in out-of-tree build test.

* Generate makefile fragments in the build tree.
2018-08-22 15:19:29 -05:00
Field G. Van Zee
7afd095af3 Removed skx from code snippet in previous commit.
Details:
- The docs/ConfigurationHowTo.md document was written with examples that
  did not yet contain the skx sub-configuration, but the previous commit
  included bli_arch.c code copied and pasted from a recent commit that
  does support skx. To keep things consistent, I've removed skx from the
  recently-added ConfigurationHowTo.md code snippet.
2018-08-22 14:58:24 -05:00
Field G. Van Zee
48211a980d Update to docs/ConfigurationHowTo.md.
Details:
- Added missing language directing the reader to modify the config_name
  string array in bli_arch.c when adding a new sub-configuration. Thanks
  to Devangi Parikh for reporting this missing section.
2018-08-22 14:55:02 -05:00
Field G. Van Zee
65c9096c6e Fixed broken -p option to configure.
Details:
- Fixed some stale code that was preventing the -p option to configure
  from working as expected (though the --prefix option was unaffected).
  This bug was was most likely introduced in  7e5648c (May 7 2018).
  Thanks to Dave Love for reporting this issue.
2018-08-17 11:44:12 -05:00
Field G. Van Zee
e358d5e497 README.md update (Funding section). 2018-08-16 12:18:45 -05:00
Field G. Van Zee
a61dd5e7bc Changed 'test' target to be more like 'check'.
Details:
- Redefined the 'test' make target in the top-level Makefile so that the
  final result ("everything passed" or at "least one failure") is echoed
  to stdout. Note that 'check' is unchanged, and thus is now effectively
  a fast version of 'test'.
- Updated docs/BuildSystem.md to reflect the above change.
2018-08-14 17:08:03 -05:00
Field G. Van Zee
ce5c3a198a Merge branch 'master' of github.com:flame/blis 2018-08-14 16:52:19 -05:00
Field G. Van Zee
4f6745d68a Fixed link error when building only shared library.
Details:
- Fixed a linker error that occurred when attempting to compile and link
  the testsuite and/or BLAS test drivers after having configured BLIS to
  only generate a shared library (no static library). The chosen
  solution involved
  (1) adding the local library path, $(BASE_LIB_PATH), to the search
      paths for the shared library via the link option
      -Wl,-rpath,$(BASE_LIB_PATH).
  (2) adding a local symlink to $(BASE_LIB_PATH) that uses the .so major
      version number so that ld would find the shared library at
      execution time.
  Thanks to Sajid Ali for reporting this issue, to Devin Matthews for
  pointing out the need for the -rpath option, and to Devangi Parikh for
  helping Sajid isolate the problem.
- Added #include <ctype.h> to bli_system.h to avoid a compiler warning
  resulting from using toupper() from bli_string.c without a prototype.
  Thanks again to Sajid Ali, whose build log revealed this compiler
  warning.
- Added '*.so.*' to .gitignore.
- CREDITS file update.
2018-08-14 16:50:47 -05:00
Devangi N. Parikh
0bbe69d5ed Updated plotting scripts in test/studies.
Details:
- Fixed indexing on plots to correspond to the removal of dtime in
  the test drivers.
2018-08-14 14:49:58 -05:00
Field G. Van Zee
e93e0e149e Removed redefinition of axpyv, scal2v func types.
Details:
- Removed a stray/accidental redefinition of axpyv and scal2v function
  types in frame/1d/bli_l1d_ft.h (probably a copy/paste leftover during
  development).
2018-08-07 15:54:30 -05:00
Field G. Van Zee
1deb33bd16 Updated penryn kernels to use new _ker_ft type names.
Details:
- Updated older _ft kernel type suffixes used within penryn level-1v
  and -1f kernels to use the newer _ker_ft suffix that was introduced
  in 0175483. (Thank you Travis CI.)
2018-08-07 15:02:50 -05:00
Field G. Van Zee
9cb0b023ca INSTALL file update. 2018-08-07 14:21:07 -05:00
Field G. Van Zee
017548314f Replaced function chooser macros w/ func ptr arrays.
Details:
- Previously, most object API functions (_oapi.c) used a function
  chooser macro that would expand out to an if-elseif-elseif-else
  conditional that used a num_t datatype to call the appropriate
  type-specific API (_tapi.c). This always felt a little hackish, and
  would get in the way somewhat of addig support for new num_t datatypes
  in the future. So, I've replaced that functionality with code that
  queries a function pointer that is then typecast appropriately. This
  model of function calling was already pervasive for kernels queried
  from the cntx_t structure. It was also already in use in various other
  functions, such as macrokernels, and this commit simply extends that
  pattern.
- The above change required many new files, mostly header files, that
  define the function types (mostly _ft.h) for the queriable functions
  as well as some source files to define the function pointer arrays and
  their corresponding query functions (_fpa.c). Various other function
  types, mostly for kernel function types, were renamed to reduce the
  potential for confusion with the function types for expert and basic
  (non-expert) typed API functions.
- Removed definitions for all of the "bli_call_ft_*()" function chooser
  macros from bli_misc_macro_defs.h.
2018-08-07 14:13:25 -05:00
Field G. Van Zee
addce08966 Format spec and other updates in test, test/3m4m.
Details:
- Removed the dtime (delta time, or wallclock time) column from the
  matlab output of all test drivers in test, test/3m4m, test/studies.
  This value was rarely (if ever) really needed and usually only served
  to take up screen space.
- Updated format specifier in test/studies/skx to use %7.2f instead of
  %6.3f.
- For the test drivers in 'test' directory, added an initial line of
  output that sets last entry of matlab matrix to zero in order to
  induce a pre-allocation of the entire array of performance results.
2018-08-06 13:18:20 -05:00
Field G. Van Zee
94d5ef42c8 Adjusted gflops format spec in testsuite, test/3m4m.
Details:
- Changed the format specifier for the gflops column in the testsuite
  output from %7.3f to %7.2f. This was done mainly to keep the output
  aligned properly when the expected perfomance exceeded 1000 gflops.
  Also, two decimal places still conveys plenty of precision for all
  practical applications, including just eyeballing performance deltas
  between two executions (let alone two implementations).
- Changed the format specifier for gflops in the test/3m4m drivers
  from %6.3f to %7.2f (for the same reasons listed above).
2018-08-04 15:57:17 -05:00
Devangi N. Parikh
c7ff06bae9 Merge branch 'master' of https://github.com/flame/blis 2018-08-01 14:20:41 -05:00
Devangi N. Parikh
6074082cd3 Fixed bug in bli_cntx_set_packm_ker_dt() implementation.
Details:
- Fixed bug in static function bli_cntx_set_[packm/unpackm]_ker_dt(), which
   were incorrectly calling bli_cntx_get_[packm/unpackm]_ker_dt to get the
   corresponding func_t.
2018-08-01 13:30:51 -05:00
Field G. Van Zee
ebe998d06c Fixed typos in BuildSystem.md from previuos commit. 2018-08-01 13:24:00 -05:00
Field G. Van Zee
e72a344e94 Added table of 'make' targets to BuildSystem.md.
Details:
- Added a new section to BuildSystem.md that describes the most useful
  make targets defined in the top-level Makefile.
2018-08-01 13:00:38 -05:00
Field G. Van Zee
4f60d0288e README.md, comment updates.
Details:
- Added links, and sandbox language to README.md.
- Adjusted some comments in high-level level-3 object functions to make
  clear what bli_thread_init_rntm() does.
2018-07-30 19:22:57 -05:00
Field G. Van Zee
455d3f49e5 Edits to object/typed API, multithreading docs. 2018-07-29 18:31:29 -05:00
Field G. Van Zee
922a1c05e0 More tweaks to README.md. 2018-07-28 20:15:55 -05:00
Field G. Van Zee
a7a0cf2b5d More edits to docs/Multithreading.md. 2018-07-28 16:59:31 -05:00
Field G. Van Zee
be21d0cf68 Fixed typos in docs/Multithreading.md. 2018-07-28 16:46:51 -05:00
Field G. Van Zee
eac07c7b4f Edits to docs/Multithreading.md. 2018-07-28 16:45:28 -05:00
Field G. Van Zee
5438375a03 Fixed link in README.md. 2018-07-28 16:34:21 -05:00
Field G. Van Zee
1f1a237d3f Fixed links in BLISTypedAPI.md. 2018-07-28 16:33:28 -05:00
Field G. Van Zee
89c8806e3a Minor doc fixes to previous commit. 2018-07-28 16:30:56 -05:00
Field G. Van Zee
b8c7574f84 README.md, typed/object API updates.
Details:
- Updated the typed and object APIs to include language on the rntm_t
  parameters in the expert interfaces.
- Updated README to include link to object API.
2018-07-28 16:27:09 -05:00
Field G. Van Zee
29c34c4adb CREDITS file update. 2018-07-27 16:26:19 -05:00
Field G. Van Zee
55a04edf52 CHANGELOG update (0.4.0) 2018-07-27 16:10:46 -05:00
Field G. Van Zee
4ad61ce905 Version file update (0.4.0) 0.4.0 2018-07-27 16:10:43 -05:00
Field G. Van Zee
b86cf13793 Release Notes update in advance of next version. 2018-07-27 16:08:21 -05:00
Field G. Van Zee
a8b4084a0e CREDITS file update. 2018-07-27 16:07:26 -05:00
Field G. Van Zee
8e10cac5f3 Updates to CREDITS, RELEASING, config/README.md.
Details:
- Added individuals' github handles to CREDITS file.
- Updated RELEASING, config/README.md files.
2018-07-27 14:45:35 -05:00
Field G. Van Zee
401b69c8f2 More indentation in docs/ConfigurationHowTo.md. 2018-07-25 17:55:13 -05:00
Field G. Van Zee
1c6a1b921e Trying new indentation in ConfigurationHowTo.md.
Details:
- Modified a few sections to take advantage of a feature of markdown
  that allows a bullet or enumeration to have multiple paragraphs. This
  is a trial run to make sure the indentation looks good when rendered
  in a web browser.
2018-07-25 17:14:58 -05:00
Field G. Van Zee
71f9787195 Whitespace changes to macrokernels' func ptr defs. 2018-07-25 15:55:36 -05:00
Field G. Van Zee
87d57c31c2 Various minor updates to typed, object API docs. 2018-07-25 14:20:18 -05:00
Field G. Van Zee
fb6e16268a Consolidated prototypes in bli_l1v_tapi.h.
Details:
- Consolidated typed API function prototypes in bli_l1v_tapi.h by
  leveraging identical function signatures between operations.
- Removed 'restrict' keyword since it is not actually present in the
  function definitions.
2018-07-25 14:17:28 -05:00
Field G. Van Zee
af60d738f2 Finished object creation part of BLISObjectAPI.md.
Details:
- Filled in remaining section on object creation function reference
  of BLISObjectAPI.md. All object management functions demonstrated as
  part of the example code in examples/oapi are now documented, as well
  as some other functions that are not shown in the example code.
- Updated variuos links (mostly in function index) to correctly point to
  the object API reference instead of the typed API reference.
- Added documentation to getijm, setijm.
2018-07-24 15:35:52 -05:00
Field G. Van Zee
8217a6a3b6 Moved sandbox README.md to docs/Sandboxes.md.
Details:
- Relocated sandbox/ref99/README.md to docs/Sandboxes.md and made minor
  edits to the document.
2018-07-24 13:13:10 -05:00
Field G. Van Zee
b7db293323 Explicitly typecast return vals in static funcs.
Details:
- Added explicit typecasting to various functions (mostly static
  functions), primarily those in bli_param_macro_defs.h,
  bli_obj_macro_defs.h, bli_cntx.h, bli_cntl.h, and a few other header
  files.
- This change was prompted by feedback from Jacob Gorm Hansen, who
  reported that #including "blis.h" from his application caused a
  gcc to output error messages (relating to types being returned
  mismatching the declared return types) when used via the C++ compiler
  front-end. This is the first pass of fixes, and we may need to
  iterate with additional follow-up commits (#233).
2018-07-19 11:14:30 -05:00